User manual
588
mikoPascal PRO for PIC32
MikroElektronika
strcat
strcat2
strchr
Prototype
procedure strcat(var s1, s2 : string);
Description The function appends the value of string s2 to string s1 and terminates s1 with a null character.
Example
txt := ‘mikroElektronika’;
txt_sub := ‘mikr’;
txt[3] := 0;
strcat(txt, ‘_test’); // routine will append the ‘_test’ at the place of
the rst null character, adding terminating null character to the result
Prototype
procedure strcat2(var l1, s1, s2 : string);
Description The procedure adjoins string s2 at the end of the string s1, or at the rst null character of the s1, and
places the result string into l string.
Example
txt := ‘mikroElektronika’;
txt_sub := ‘_Test’;
l1 := string[21];
strcat2(l1, txt, txt_sub); // routine will adjoin strings txt and txt_sub
and place the result into l; l = mikroElektronika_Test
Prototype
function strchr(var s : string; ch : byte) : word;
Description The function searches the string s for the rst occurrence of the character ch. The null character
terminating s is not included in the search.
The function returns the position (index) of the rst character ch found in s; if no matching character
was found, the function returns 0xFFFF.
Example
txt := ‘mikroElektronika’;
res := strchr(txt, ‘E’); // routine will locate the character ‘E’ in the
‘txt’ string, and return the position of the character