User Tools

Site Tools


uphp:functions:charat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:charat [2017/02/18 16:01]
jeff
uphp:functions:charat [2021/09/13 05:57] (current)
Line 1: Line 1:
 ======charat====== ======charat======
-<badge>WMPRO, WMMINI FW > 1.0</badge> <badge>WMMEGA FW > 2.0</badge> 
  
-Return ASCII code for character in string at index+<badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> 
 + 
 +Return the ASCII code for character in a <html><b><span style="color:green">string<span style="color:black"></b> at an <b><span style="color:blue">index</b></html>
  
 ====Description==== ====Description====
-<well size="sm"><html><span style="font-size:125%;color:green;">charat <span style="color:black;"></html>[[charat]] <html>( <span style="color:green;">string <span style="color:blue;">$str<span style="color:black;">, <span style="color:green;">int <span style="color:blue;">$index )</html></well>+ 
 +<well size="sm"><html> 
 +<span style="font-size:125%;color:green">int 
 +<span style="color:black">charat ( 
 +<span style="color:green">string 
 +<span style="color:blue">$str<span style="color:black">,  
 +<span style="color:green">int 
 +<span style="color:blue">$index 
 +<span style="color:black">) 
 +</html></well>
  
 ====Parameters==== ====Parameters====
-<html><span style="color:blue;"><b>str</b><span style="color:black;"></html>:  String to get character from 
  
-<html><span style="color:blue;"><b>index</b><span style="color:black;"></html>:  Index into string (the first character in the string is index = 0)+<html><b><span style="color:blue">$str<span style="color:black"></b>:  <b><span style="color:green">String<span style="color:black"></bto get character from</html>
  
-====Return Value==== +<html><b><span style="color:blue">$index<span style="color:black"></b></html>:  Index into string (the first character in the string is index = 0) 
-ASCII code (1-255)+ 
 +====Return Values==== 
 + 
 +<html><b><span style="color:green">Integer<span style="color:black"></b></html> ASCII code (0-255)
  
 ====Example==== ====Example====
-<code php><?  + 
-$str="Test String"; +<code php> 
-$ascii=charat($str,5); +<? 
-print($s); // result is 83 +  $str="Test String"; 
-?></code>+  $ascii=charat($str,5); 
 +  print($ascii); // result is 83 
 +?> 
 +</code>
  
 ====See Also==== ====See Also====
-[[ord()]] - Return ASCII code of first character in a string 
  
-[[chr()]] - Return character for an ASCII code+[[ord()]] - Return the ASCII code for a character 
 + 
 +[[chr()]] - Return the character for an ASCII code
  
uphp/functions/charat.1487433674.txt.gz · Last modified: 2021/09/13 05:56 (external edit)