String Class Methods

Table 1. Object Methods
Name Description
charAt(Numeric index)
Returns a String containing the character at the specified index in the current String.
contains(String s)
Returns a Boolean value (TRUE/FALSE) specifying whether sis contained within the current String.
endsWith(String s)
Returns a Boolean value (TRUE/FALSE) specifying whether the current String ends with s.
equals( String s) 
Returns a Boolean value (TRUE/FALSE) specifying whether s matches the current String. If one of the Strings is null the method returns FALSE.
equalsIgnoreCase( String s)
Returns a Boolean value (TRUE/FALSE) specifying whether s matches the current String, ignoring character case. If one of the Strings is null the method returns FALSE.
format (Numeric number, Enum format)
Sets the format of the page number string for a PAGENOBOX. The value for format can be: ARABIC, LOWERROMAN, UPPERROMAN
indexOf( String s)
 
Returns a Numeric value representing the index of swithin the current String.
indexOf( String s, Numeric index )
Returns a Numeric value representing the index of swithin the current String, starting from byte position index. Returns zero if the substring was not found. Returns -1 if the current String is null.
isEmpty()
Returns a Boolean value. Returns true if the current string has a length of zero (length()=0), otherwise false.
isNull()
Returns a Boolean value. Returns true if the current string has a length of zero (length()=0) and the string is tagged as null, otherwise false. This is the case for null valued input variables read from the input stream.
lastIndexOf(String s) 
Returns a Numeric value representing the index within the current String of the last occurrence of s, searching backward.
lastIndexOf(String s, Numeric index) 
Returns a Numeric value representing the index within the current String of the last occurrence of s, searching backward. starting at the specified position index.
length( ) 
Returns a Numeric value representing the length of the current String.
matches(String s)
Returns a Boolean value specifying whether the current String matches the regular expressions.
replace(String old, String new) 
Replaces old in the current String with new.
replaceAll(String old, String new) 
Replaces every occurrence of old in the current String with new.
replaceFirst(String old, String new)
Replaces every occurrence of old in the current String with new.
startsWith(String s) 
Returns a Boolean value specifying whether the current String begins with s.
startsWith(String s, Numeric index)
Returns a Boolean value specifying whether the substring in the current String beginning at the position index contains s. The first byte of a string is at position 0.
subString( Numeric sindex, 
 Numeric eindex )
Returns the substring starting at byte position sindex and ending at the character at eindex-1. The first byte of a string is at position 0.
substring(Numeric index)
Returns the substring starting at the position index in the current String. The first byte of a string is at position 0.
toLowerCase( )
Converts the current String to lowercase.
toString() 
Converts the current Numeric value to a String.
toUpperCase( )
Converts the current String to uppercase.
translate( )
Uses the current String as the key for a lookup in Genero localization files; returns any entry found, otherwise returns the current String itself.
trim( )
Removes white space characters from the beginning and end of the current String.
trimCompress()
Removes white space characters at the beginning and end of the current String, as well as any contained white space.
trimLeft( )
Removes white space characters from the beginning of the current String.
trimRight( )
Removes white space characters from the end of the current String.
urlEncode( )
Returns a URL encoding of the current String.