Einzelnen Beitrag anzeigen
Alt 06.06.2007, 19:07   #28
RKabis
Registrierter Benutzer
Beschreibung vorhanden SUBSTR

E r g e b n i s / R e s u l t

Liefert einen Unterstring von einem anderen String einer Position.
Returns a substring of another string from a position

B e s c h r e i b u n g / D e s c r i p t i o n

This function returns a string composed of the rest of another string
from a position passed to it. The user tells the function at what
point to start the copy from.
SUBSTR simplifies one of the most common uses of EXTRACT. Just the
starting position is required, the user does not have to know how long
the string is.

S y n t a x

Code:
answer = call ('SUBSTR' , string , value)
P a r a m e t e r
string - is any string or constant
value - is an integer, specifying the position the copy starts from.
If value is less than 1, then the entire string is returned. If value is
greater than the length of the string, then the last character is
returned.
R e t u r n s

Returns a string variable.

B e i s p i e l / E x a m p l e

Code:
attach 'string'
put call ('SUBSTR' , 'Test String' , 6) ! prints String
a = 'AA Aerospace'
b = call ('SUBSTR' , a , 9) ! b contains 'pace'
detach 'string'
Q u e r v e r w e i s / R e f e r e n c e

MID
RKabis ist offline   Mit Zitat antworten