Top  >  Lycia reference  >  Querix 4GL  >  Classes and Methods  >  base classes and methods  >  base.StringBuffer class

 

base.StringBuffer methods

 

These methods are used to manipulate the character strings.

 

base.StringBuffer methods allow working directly with the internal string buffer (without creating new buffers for long character strings). That means  that manipulating  base.StringBuffer objects will take you less time than working with STRING data  type (which need a new buffer for a long string of characters).

 

base.StringBuffer methods are based on the byte-lengh semantics.

 

base.Stringbuffer methods are  invoked in the following way::

 

CALL base.StringBuffer.<Method>(<parameters>)

 

base.StringBuffer.create()

creates a base.StringBuffer object

base.StringBuffer.append()

appends the string to the current string

base.StringBuffer.clear()

clears the string buffer

base.StringBuffer.toString()          

converts the string buffer into the STRING value

base.StringBuffer.equals()         

compares strings to the strings values (sensitive case)

base.StringBuffer.equalsIgnoreCase()

compares strings to the strings values

(insensitive case - compare to base.StringBuffer.equals())

base.StringBuffer.getCharAt()

returns the character at the specified position

base.StringBuffer.getIndexOf()

returns the integer number, that identifies the substring position

base.StringBuffer.getLength()

returns the length of the string

base.StringBuffer.subString()

retrieves a substring from the string buffer

base.StringBuffer.toLowerCase()

converts the string in the buffer to the lower case

base.StringBuffer.toUpperCase()

converts the string to the upper case

base.StringBuffer.trim()

removes leading and trailing spaces

base.StringBuffer.trimLeft()

removes only the leading spaces from the string buffer value and leaves the trailing spaces intact

base.StringBuffer.trimRight()

removes only the trailing spaces from the string buffer value and leaves the leading spaces intact

base.StringBuffer.replace()

replaces one string with another string

base.StringBuffer.replaceAt()

replaces a part of the string with another string

base.StringBuffer.insertAt()

inserts a string at the given position