OAR

RTEMS GNU Tools On-Line Library


String Builtins

PREV UP next Bookshelf GASP

3.8.5: String primitives

You can use these primitives to manipulate strings (in the argument field of GASP statements):

.LEN("str")
Calculate the length of string "str", as an absolute expression. For example, `.RES.B .LEN("sample")' reserves six bytes of memory.
.INSTR("string", "seg", ix)
Search for the first occurrence of seg after position ix of string. For example, `.INSTR("ABCDEFG", "CDE", 0)' evaluates to the absolute result 2.

The result is -1 if seg does not occur in string after position ix.

.SUBSTR("string",start,len)
The substring of string beginning at byte number start and extending for len bytes.


PREV UP next Bookshelf GASP

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.