EAGLE Help

strsub()


Function
Extracts a substring from a string.

Syntax
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.

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

Index Copyright © 2005 CadSoft Computer GmbH