2006-08-20 15:49:48 +00:00
|
|
|
//global xyz;
|
|
|
|
|
2006-08-13 06:33:30 +00:00
|
|
|
END {
|
2006-08-20 15:49:48 +00:00
|
|
|
//local xyz;
|
|
|
|
|
2006-08-13 06:33:30 +00:00
|
|
|
print index ("abc", "abc");
|
|
|
|
print index ("abc", "b");
|
2006-08-13 16:05:04 +00:00
|
|
|
print index ("abc", "kabc");
|
|
|
|
|
|
|
|
print "----------------------------";
|
|
|
|
print substr ("abc", "abcdefg", 5);
|
|
|
|
print substr ("abc", -1, 5);
|
|
|
|
print substr ("abc", 0, 5);
|
|
|
|
print substr ("abc", 1, 5);
|
|
|
|
print substr ("abc", 2.829, 5);
|
|
|
|
print substr ("abc", "3", 5);
|
|
|
|
print substr ("abc", 4, 5);
|
|
|
|
|
2006-08-17 03:49:30 +00:00
|
|
|
/*
|
2006-08-13 16:05:04 +00:00
|
|
|
a[1] = 20;
|
|
|
|
substr (a, 3, 4);
|
2006-08-17 03:49:30 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
print tolower ("AbcDEF");
|
|
|
|
print toupper ("AbcDEF");
|
2006-08-17 14:10:21 +00:00
|
|
|
|
|
|
|
arr[0] = "xxx";
|
2006-08-18 07:52:47 +00:00
|
|
|
//print split ("abc def abc", arr);
|
2006-08-20 15:49:48 +00:00
|
|
|
print split ("abc def abc", j);
|
|
|
|
|
|
|
|
//xyz = 20;
|
|
|
|
//print xyz;
|
|
|
|
print split ("abc def abc", ((xyz)));
|
|
|
|
//for (i in arr)
|
|
|
|
|
|
|
|
for (i in xyz)
|
2006-08-17 14:10:21 +00:00
|
|
|
{
|
2006-08-20 15:49:48 +00:00
|
|
|
print i, " ", xyz[i];
|
2006-08-17 14:10:21 +00:00
|
|
|
}
|
2006-08-13 06:33:30 +00:00
|
|
|
}
|