Clib.strchr()
syntax: |
Clib.strchr(str, chr) |
where: |
str - string to search for a character.
chr - character to search for.
|
return: |
string - beginning at the point in string where chr is found, else null if is not found..
|
description: |
This method searches the parameter str for the character chr. It returns a variable indicating the first occurrence of chr in str, else it returns null if chr is not found in str.
|
see: |
Clib.strstr(), String indexOf()
|
example: |
// The following code fragment:
var str = "I can't stand soggy cereal." var substr = Clib.strchr(str, 's'); Clib.printf("str = %s\n", str); Screen.writeln("substr = " + substr);
// results in the following output. // str = I can't stand soggy cereal. // substr = stand soggy cereal. |