7.9.8.84. GEL_SubStrΒΆ

Return a substring of a literal string or string variable.

Format

GEL_SubStr( text ,begin, count);

Parameters

text is a literal string or string variable

begin is an integer representing the starting position of the substring

count is an integer indicating the length of the substring

Description

return a substring of text

Synchronous

Synchronous from GEL: Yes

Completely synchronous: Yes

Example

string company = "Texas Instruments"; string product = "CCS" string product_str = GEL_StrCat(company, " ", product, " ", "11.2");

int length = GEL_StrLen(product_str); // length == 26 string state = GEL_SubStr(company, 0, 5); // state == "Texas"

GEL_TextOut(product_str);

Related Topics

GEL_StrLen

GEL_SubStr