| |||||
Previous Next |
The Text type represents undefined-length ASCII character strings. Literals are between characters ' or ". A character string may contain line feeds (unix, Macintosh or DOS mode), form feeds and tabulations. It may also contain unicode characters given with their octal code postfixed to the escape character \; this code is between 0 and 377. \ can also be before: r for a Macintosh line feed n for a Unix line feed t for a tabulation f for a form feed b for a backspace ' or " to loose their literal ending property \, to loose its excape character property. Other letters are unrecognized.
Operation Summary | |
Text | +(Text rhs) Shorthand for concat. |
Boolean | =(Text rhs) True if this string and rhs contain the same characters, in the same order. |
Boolean | >=(Text rhs) True if this string is after or is the same as rhs in the alphabetical order. |
Boolean | >(Text rhs) True if this string is after rhs in the alphabetical order. |
Boolean | <=(Text rhs) True if this string is before or is the same as rhs in the alphabetical order. |
Boolean | <(Text rhs) True if this string is before rhs in the alphabetical order. |
Boolean | <>(Text rhs) True if this string and rhs do not contain the same characters, in the same order. |
Text | concat(Text rhs) The concatenation of this string and rhs. |
Text | crypt The encryption of this string. |
Boolean | endsWith(Text pattern) True if this string ends with pattern. |
Boolean | equalsIgnoreCase(Text rhs) True if this string and rhs contain the same case insensitive characters, in the same order. |
Sequence | getChars A sequence of characters whose concatenation would be equal to this string. |
Integer | indexOf(Text pattern) The index of the first occurence of the sub-string pattern. |
Integer | indexOf(Text pattern, Integer offset) The index of the first occurence of the sub-string pattern, seeking from position offset in this string. |
Integer | lastIndexOf(Text pattern) The index of the last occurence of the sub-string pattern. |
Integer | lastIndexOf(Text pattern, Integer offset) The index of the last occurence of the sub-string pattern, seeking up to position offset in this string. |
Boolean | like(Text pattern) True if this string is equivalent to pattern. |
Text | replace(Text pattern, Text offset) This string where each occurence of the sub-string pattern is replaced by the sub-string offset. |
Integer | size The number of characters in this string. |
Boolean | startsWith(Text pattern) True if this string starts with pattern. |
Text | substring(Integer from, Integer to) The sub-string of this string starting at charcter number from, up to and including character number to. |
Text | toLower The value of this string with all uppercase characters converted to lowercase characters. |
Text | toUpper The value of this straing with all lowercase characters converted to uppercase characters. |
Operations inherited from type OclAny |
=, <>, oclAsType, oclIsKindOf, oclIsTypeOf |
Operations Detail |
public Boolean =(Text rhs)
public Boolean <>(Text rhs)
public Integer size
public Text concat(Text rhs)
public Text +(Text rhs)
public Text toUpper
public Text toLower
public Text substring(Integer from, Integer to)
public Text crypt
public Boolean <(Text rhs)
public Boolean >(Text rhs)
public Boolean <=(Text rhs)
public Boolean >=(Text rhs)
public Boolean like(Text pattern)
public Sequence getChars
public Boolean equalsIgnoreCase(Text rhs)
public Boolean startsWith(Text pattern)
public Boolean endsWith(Text pattern)
public Integer indexOf(Text pattern)
public Integer indexOf(Text pattern, Integer offset)
public Integer lastIndexOf(Text pattern)
public Integer lastIndexOf(Text pattern, Integer offset)
public Text replace(Text pattern, Text replacment)
| |||||
Previous Next |