User Tools

Site Tools


uphp:functions:charat

This is an old revision of the document!


charat

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Return ASCII code for character in string at index

Description

int charat ( string $str, int $index )

Parameters

$str: String to get character from

$index: Index into string (the first character in the string is index = 0)

Return Value

ASCII code (0-255)

Example

<?
  $str="Test String";
  $ascii=charat($str,5);
  print($ascii); // result is 83
?>

See Also

ord() - Return ASCII code of first character in a string

chr() - Return character for an ASCII code

uphp/functions/charat.1491311046.txt.gz · Last modified: 2021/09/13 05:56 (external edit)