String

String

The standard type String represents strings, which can be both ASCII or Unicode. String is itself an instance of the metatype PrimitiveType (from UML).

conformsTo OclAny

Operations

=(object2 : OclAny) : Boolean precedence: EQUALITY

<>(object2 : OclAny) : Boolean precedence: EQUALITY

+(s : String) : String precedence: ADDITIVE

The concatenation of self and s.

at(i : Integer) : String

Queries the character at position i in self.

characters() : Sequence<String>

Obtains the characters of self as a sequence.

concat(s : String) : String

The concatenation of self and s.

equalsIgnoreCase(s : String) : Boolean

Queries whether s and self are equivalent under case-insensitive collation.

indexOf(s : String) : Integer

Queries the index in self at which s is a substring of self, or zero if s is not a substring of self. The empty string is considered to be a substring of every string but the empty string, at index 1. No string is a substring of the empty string.

size() : Integer

The number of characters in self.

substring(lower : Integer, upper : Integer) : String

The sub-string of self starting at character number lower, up to and including character number upper. Character numbers run from 1 to self.size().

toBoolean() : Boolean

Converts self to a boolean value.

toInteger() : Integer

Converts self to an Integer value.

toLower() : String

This is a deprecated variant of toLowerCase() preserving compatibility with traditional Eclipse OCL behaviour.

toLowerCase() : String

Converts self to lower case, using the locale defined by looking up oclLocale in the current environment. Otherwise, returns the same string as self.

toReal() : Real

Converts self to a Real value.

toString() : String

Returns self.

toUpper() : String

This is a deprecated variant of toUpperCase() preserving compatibility with traditional Eclipse OCL behaviour.

toUpperCase() : String

Converts self to upper case, using the locale defined by looking up oclLocale in the current environment. Otherwise, returns the same string as self.

>(s : String) : Boolean precedence: RELATIONAL

True if self is greater than s, using the locale defined by looking up oclLocale in the current environment.

<(s : String) : Boolean precedence: RELATIONAL

True if self is less than s, using the locale defined by looking up oclLocale in the current environment.

<=(s : String) : Boolean precedence: RELATIONAL

True if self is less than or equal to s, using the locale defined by looking up oclLocale in the current environment.

>=(s : String) : Boolean precedence: RELATIONAL

True if self is greater than or equal to s, using the locale defined by looking up oclLocale in the current environment.