Returns a substring from a given string.
String.Substring( n1 [, n2])
Where:
String
Is an attribute or variable based on the Character/VarChar/LongVarChar data type.
n1 and n2
Must be numeric expressions.
Type Returned:
Character
Data Types: Character, VarChar, LongVarChar
Generators: .NET,
.NET Framework, Java, RPG, Cobol, Android, Apple
This method returns a substring from a given string.
If n2 = 0 an empty string is returned.
Omitting n2 is equivalent to setting it to CharacterExpression.length() - n1 + 1.
- 1 <= CharacterExpression length <= 255
- 0 < n1 <= CharacterExpression length
- n2 >= 0
&Txt = '1234567890'
&Substr = &Txt.Substring(5,2) //&Substr = '56'
Omitting n2 is possible since GeneXus 15 Upgrade 7.
Concat function
Str function