This shows you the differences between two versions of the page.
uphp:functions:charat [2017/02/21 08:37] jeff |
uphp:functions:charat [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======charat====== | ||
- | < | ||
- | |||
- | Return ASCII code for character in string at index | ||
- | |||
- | ====Description==== | ||
- | <well size=" | ||
- | <span style=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | |||
- | ====Parameters==== | ||
- | < | ||
- | |||
- | < | ||
- | |||
- | ====Return Value==== | ||
- | ASCII code (0-255) | ||
- | |||
- | ====Example==== | ||
- | <code php><? | ||
- | $str=" | ||
- | $ascii=charat($str, | ||
- | print($s); // result is 83 | ||
- | ?></ | ||
- | |||
- | ====See Also==== | ||
- | [[ord()]] - Return ASCII code of first character in a string | ||
- | |||
- | [[chr()]] - Return character for an ASCII code | ||