summaryrefslogtreecommitdiffstats
path: root/src/CBot/tests/scenarios/TestStr.txt
blob: 683ec1bd8ed7fbcdbf6ebef1e4c77ba4e61f8562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern public void TSTR()
{
	string s = "C'est un essai";

	print ( s, strlen(s), strleft(s, 3), strright(s,3), strmid(s, 2), strmid(s,2,3), strfind(s, "un"), strfind(s, "sdgfld") );

	show ( strupper(s), strlower(s) );

	s = "123.45" ;
	print ( strval(s) );


	string sub = strright("abcdef", 2);  // sub vaut "ef###", # �tant un caract�re bizarre quelconque
	show (sub);
	int pos = strfind("abcdef", "xy");  // pos vaut -1. Pourquoi pas nan ?
	show(pos);
}