EAGLE Help Light

strsub()

Funkce
Extracts a substring from a string.

Zápis
string strsub(string s, int start[, int length]);

Returns
The strsub function returns the substring indicated by the start and length value.

The value for length must be positive, otherwise an empty string will be returned. If length is ommitted, the rest of the string (beginning at start) is returned.

If start points to a position outside the string, an empty string is returned.

Příklad

string s = "This is a string";
string t = strsub(s, 4, 7);
printf("The extracted substring is: %s\n", t);


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH