Type String

All Supertypes:
OclAny, Text

Predefined type String
extends Text

The String type represents ASCII character strings, with a maximum of 255 characters. Literals have the same structure as Text ones.


Operation Summary
 String +(String rhs)
          Shorthand for concat.
 Boolean checkBoolean
          Check if this string can be interpreted as a Boolean.
 Boolean checkByte
          Check if this string can be interpreted as a Byte.
 Boolean checkDate
          Check if this string can be interpreted as a Date.
 Boolean checkDouble
          Check if this string can be interpreted as a Double.
 Boolean checkFloat
          Check if this string can be interpreted as a Float.
 Boolean checkInt
          Check if this string can be interpreted as an Int.
 Boolean checkInteger
          Check if this string can be interpreted as an Integer.
 Boolean checkLong
          Check if this string can be interpreted as a Int.
 Boolean checkReal
          Check if this string can be interpreted as a Real.
 Boolean checkShort
          Check if this string can be interpreted as a Short.
 Boolean checkTime
          Check if this string can be interpreted as a Time.
 String concat(String rhs)
          The concatenation of this string and rhs.
 Boolean parseBoolean
          Returns the interpretation of this string as a Boolean.
 Byte parseByte
          Returns the interpretation of this string as a Byte.
 Date parseDate
          Returns the interpretation of this string as a Date.
 Double parseDouble
          Returns the interpretation of this string as a Double.
 Float parseFloat
          Returns the interpretation of this string as a Float.
 Int parseInt
          Returns the interpretation of this string as an Integer.
 Integer parseInteger
          Returns the interpretation of this string as an Integer.
 Long parseLong
          Returns the interpretation of this string as a Long.
 Real parseReal
          Returns the interpretation of this string as a Real.
 Short parseShort
          Returns the interpretation of this string as a Short.
 Time parseTime
          Returns the interpretation of this string as a Time.
 String replace(String pattern, String replacment)
          This string where each occurence of the sub-string pattern is replaced by the sub-string replacment.
 String substring(Integer from, Integer to)
          The sub-string of this string starting at character number from, up to and including character number to.
 String toLower
          The value of this string with all uppercase characters converted to lowercase characters.
 String toUpper
          The value of this string with all lowercase characters converted to uppercase characters.
 
Operations inherited from type Text
+, =, >=, >, <=, <, <>, concat, crypt, endsWith, equalsIgnoreCase, getChars, indexOf, indexOf, lastIndexOf, lastIndexOf, like, replace, size, startsWith
 
Operations inherited from type OclAny
=, <>, oclAsType, oclIsKindOf, oclIsTypeOf
 

Operations Detail

checkReal

 public Boolean checkReal
Check if this string can be interpreted as a Real.

checkInteger

 public Boolean checkInteger
Check if this string can be interpreted as an Integer.

checkDouble

 public Boolean checkDouble
Check if this string can be interpreted as a Double.

checkFloat

 public Boolean checkFloat
Check if this string can be interpreted as a Float.

checkLong

 public Boolean checkLong
Check if this string can be interpreted as a Int.

checkInt

 public Boolean checkInt
Check if this string can be interpreted as an Int.

checkShort

 public Boolean checkShort
Check if this string can be interpreted as a Short.

checkByte

 public Boolean checkByte
Check if this string can be interpreted as a Byte.

checkBoolean

 public Boolean checkBoolean
Check if this string can be interpreted as a Boolean.

checkDate

 public Boolean checkDate
Check if this string can be interpreted as a Date.

checkTime

 public Boolean checkTime
Check if this string can be interpreted as a Time.

parseReal

 public Real parseReal
Returns the interpretation of this string as a Real. If the interpretation fails, the default value of the type.

parseInteger

 public Integer parseInteger
Returns the interpretation of this string as an Integer. If the interpretation fails, the default value of the type.

parseDouble

 public Double parseDouble
Returns the interpretation of this string as a Double. If the interpretation fails, the default value of the type.

parseFloat

 public Float parseFloat
Returns the interpretation of this string as a Float. If the interpretation fails, the default value of the type.

parseLong

 public Long parseLong
Returns the interpretation of this string as a Long. If the interpretation fails, the default value of the type.

parseInt

 public Int parseInt
Returns the interpretation of this string as an Integer. If the interpretation fails, the default value of the type.

parseShort

 public Short parseShort
Returns the interpretation of this string as a Short. If the interpretation fails, the default value of the type.

parseByte

 public Byte parseByte
Returns the interpretation of this string as a Byte. If the interpretation fails, the default value of the type.

parseBoolean

 public Boolean parseBoolean
Returns the interpretation of this string as a Boolean. If the interpretation fails, the default value of the type.

parseDate

 public Date parseDate
Returns the interpretation of this string as a Date. If the interpretation fails, the default value of the type.

parseTime

 public Time parseTime
Returns the interpretation of this string as a Time. If the interpretation fails, the default value of the type.

concat

 public String concat(String rhs)
The concatenation of this string and rhs.

+

 public String +(String rhs)
Shorthand for concat.

toUpper

 public String toUpper
The value of this string with all lowercase characters converted to uppercase characters.
Overloads:
toUpper in type Text

toLower

 public String toLower
The value of this string with all uppercase characters converted to lowercase characters.
Overloads:
toLower in type Text

substring

 public String substring(Integer from, Integer to)
The sub-string of this string starting at character number from, up to and including character number to. The first character has number 0.
Overloads:
substring in type Text

replace

 public String replace(String pattern, String replacment)
This string where each occurence of the sub-string pattern is replaced by the sub-string replacment. If pattern is empty, do nothing. If replacment is empty, removes each occurence of pattern in this character string. replace is case sensitive.


Copyright 1999-2002 ObjeXion Software SA. All rights reserved.