String

constructor    (declared in Object)


Compare

Compares two strings, returns 0 if equal, -1 if less, 1 if more.

class method Compare(aLeft: String; aRight: String): Int32
static Int32 Compare(String aLeft, String aRight)
static func Compare(_ aLeft: String, _ aRight: String) -> Int32
static Int32 Compare(String aLeft, String aRight)
Shared Function Compare(aLeft As String, aRight As String) As Int32

Parameters:

  • aLeft:
  • aRight:

Compares two strings, returns 0 if equal, -1 if less, 1 if more.

method CompareTo(a: Object): Int32
Int32 CompareTo(Object a)
func CompareTo(_ a: Object) -> Int32
Int32 CompareTo(Object a)
Function CompareTo(a As Object) As Int32

Parameters:

  • a:

Compares two strings, returns 0 if equal, -1 if less, 1 if more.

method CompareTo(Value: String): Int32
Int32 CompareTo(String Value)
func CompareTo(_ Value: String) -> Int32
Int32 CompareTo(String Value)
Function CompareTo(Value As String) As Int32

Parameters:

  • Value:

CompareToIgnoreCase

Compares two strings, returns 0 if equal, -1 if less, 1 if more, ignoring the case.

method CompareToIgnoreCase(Value: String): Int32
Int32 CompareToIgnoreCase(String Value)
func CompareToIgnoreCase(_ Value: String) -> Int32
Int32 CompareToIgnoreCase(String Value)
Function CompareToIgnoreCase(Value As String) As Int32

Parameters:

  • Value:

Contains

Check if a string is contained in another string.

method Contains(Value: String): Boolean
Boolean Contains(String Value)
func Contains(_ Value: String) -> Boolean
Boolean Contains(String Value)
Function Contains(Value As String) As Boolean

Parameters:

  • Value:

CopyTo

method CopyTo(SourceIndex: Int32; destination: array of Char; DestinationIndex: Int32; Count: Int32)
void CopyTo(Int32 SourceIndex, Char[] destination, Int32 DestinationIndex, Int32 Count)
func CopyTo(_ SourceIndex: Int32, _ destination: Char..., _ DestinationIndex: Int32, _ Count: Int32)
void CopyTo(Int32 SourceIndex, Char[] destination, Int32 DestinationIndex, Int32 Count)
Sub CopyTo(SourceIndex As Int32, destination As Char(), DestinationIndex As Int32, Count As Int32)

Parameters:

  • SourceIndex:
  • destination:
  • DestinationIndex:
  • Count:

EndsWith

Returns true if a string ends with a value.

method EndsWith(Value: String; aInvariant: Boolean := false): Boolean
Boolean EndsWith(String Value, Boolean aInvariant = false)
func EndsWith(_ Value: String, _ aInvariant: Boolean = false) -> Boolean
Boolean EndsWith(String Value, Boolean aInvariant)
Function EndsWith(Value As String, aInvariant As Boolean = false) As Boolean

Parameters:

  • Value:
  • aInvariant:

Copy a string to an array of char.

method Equals(aOther: Object): Boolean
Boolean Equals(Object aOther)
func Equals(_ aOther: Object) -> Boolean
Boolean Equals(Object aOther)
Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Copy a string to an array of char.

method Equals(aOther: String): Boolean
Boolean Equals(String aOther)
func Equals(_ aOther: String) -> Boolean
Boolean Equals(String aOther)
Function Equals(aOther As String) As Boolean

Parameters:

  • aOther:

EqualsIgnoreCase

Copy a string to an array of char.

method EqualsIgnoreCase(aOther: String): Boolean
Boolean EqualsIgnoreCase(String aOther)
func EqualsIgnoreCase(_ aOther: String) -> Boolean
Boolean EqualsIgnoreCase(String aOther)
Function EqualsIgnoreCase(aOther As String) As Boolean

Parameters:

  • aOther:

EqualsIgnoreCaseInvariant

Copy a string to an array of char.

method EqualsIgnoreCaseInvariant(aOther: String): Boolean
Boolean EqualsIgnoreCaseInvariant(String aOther)
func EqualsIgnoreCaseInvariant(_ aOther: String) -> Boolean
Boolean EqualsIgnoreCaseInvariant(String aOther)
Function EqualsIgnoreCaseInvariant(aOther As String) As Boolean

Parameters:

  • aOther:

Finalize  protected virtual    (declared in Object)


FirstChar

Returns a pointer to the first char of this string.

property FirstChar: ^Char read;
var FirstChar: UnsafeMutablePointer<Char> { get{} }
Char* FirstChar { __get; }
ReadOnly Property FirstChar() As Ptr(Of Char)

Format

Format a string given a format string (.net style formatting).

class method Format(aFormat: not nullable String; params aArguments: not nullable array of Object): not nullable String
static String! Format(String! aFormat, params Object[]! aArguments)
static func Format(_ aFormat: String, _ aArguments: Object...) -> String
static String Format(String aFormat, Object[]... aArguments)
Shared Function Format(aFormat As String, ParamArray aArguments As Object()) As String

Parameters:

  • aFormat:
  • aArguments:

FromChar

Creates a string from a char.

class method FromChar(c: Char): nullable String
static String? FromChar(Char c)
static func FromChar(_ c: Char) -> String?
static String FromChar(Char c)
Shared Function FromChar(c As Char) As String?

Parameters:

  • c:

FromCharArray

Creates a string from a char array.

class method FromCharArray(aArray: array of Char): nullable String
static String? FromCharArray(Char[] aArray)
static func FromCharArray(_ aArray: Char...) -> String?
static String FromCharArray(Char[] aArray)
Shared Function FromCharArray(aArray As Char()) As String?

Parameters:

  • aArray:

class method FromPAnsiChar(c: ^AnsiChar): nullable String
static String? FromPAnsiChar(AnsiChar* c)
static func FromPAnsiChar(_ c: UnsafeMutablePointer<AnsiChar>) -> String?
static String FromPAnsiChar(AnsiChar* c)
Shared Function FromPAnsiChar(c As Ptr(Of AnsiChar)) As String?

Parameters:

  • c:

class method FromPAnsiChar(c: ^AnsiChar; aCharCount: Int32): nullable String
static String? FromPAnsiChar(AnsiChar* c, Int32 aCharCount)
static func FromPAnsiChar(_ c: UnsafeMutablePointer<AnsiChar>, _ aCharCount: Int32) -> String?
static String FromPAnsiChar(AnsiChar* c, Int32 aCharCount)
Shared Function FromPAnsiChar(c As Ptr(Of AnsiChar), aCharCount As Int32) As String?

Parameters:

  • c:
  • aCharCount:

Creates a string from an unicode char pointer.

class method FromPChar(c: ^Char): nullable String
static String? FromPChar(Char* c)
static func FromPChar(_ c: UnsafeMutablePointer<Char>) -> String?
static String FromPChar(Char* c)
Shared Function FromPChar(c As Ptr(Of Char)) As String?

Parameters:

  • c:

Creates a string from an unicode char pointer.

class method FromPChar(c: ^Char; aCharCount: Int32): nullable String
static String? FromPChar(Char* c, Int32 aCharCount)
static func FromPChar(_ c: UnsafeMutablePointer<Char>, _ aCharCount: Int32) -> String?
static String FromPChar(Char* c, Int32 aCharCount)
Shared Function FromPChar(c As Ptr(Of Char), aCharCount As Int32) As String?

Parameters:

  • c:
  • aCharCount:

FromRepeatedChar

Creates a string from a repeated character.

class method FromRepeatedChar(c: Char; aCharCount: Int32): not nullable String
static String! FromRepeatedChar(Char c, Int32 aCharCount)
static func FromRepeatedChar(_ c: Char, _ aCharCount: Int32) -> String
static String FromRepeatedChar(Char c, Int32 aCharCount)
Shared Function FromRepeatedChar(c As Char, aCharCount As Int32) As String

Parameters:

  • c:
  • aCharCount:

GetEnumerator

Returns an iterator for this class.

method GetEnumerator: IEnumerator<Char>
IEnumerator<Char> GetEnumerator()
func GetEnumerator() -> IEnumerator<Char>
IEnumerator<Char> GetEnumerator()
Function GetEnumerator() As IEnumerator<Char>

GetHashCode  override virtual

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

method GetHashCode: Int32
func GetHashCode() -> Int32
Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

Function GetType() As Type

Returns the index of the substring Value in this string, or -1 if it's not found.

method IndexOf(Value: String): Int32
Int32 IndexOf(String Value)
func IndexOf(_ Value: String) -> Int32
Int32 IndexOf(String Value)
Function IndexOf(Value As String) As Int32

Parameters:

  • Value:

Returns the index of the substring Value in this string, or -1 if it's not found; starts searching at aStartfromIndex.

method IndexOf(Value: String; aStartFromIndex: Int32): Int32
Int32 IndexOf(String Value, Int32 aStartFromIndex)
func IndexOf(_ Value: String, _ aStartFromIndex: Int32) -> Int32
Int32 IndexOf(String Value, Int32 aStartFromIndex)
Function IndexOf(Value As String, aStartFromIndex As Int32) As Int32

Parameters:

  • Value:
  • aStartFromIndex:

IndexOfAny

Returns the index of any char in the array or -1 if it's not there.

method IndexOfAny(anyOf: array of Char): Int32
Int32 IndexOfAny(Char[] anyOf)
func IndexOfAny(_ anyOf: Char...) -> Int32
Int32 IndexOfAny(Char[] anyOf)
Function IndexOfAny(anyOf As Char()) As Int32

Parameters:

  • anyOf:

Insert

Insert a string at the given position and return the new strnig

method Insert(aIndex: Int32; aNewValue: String): not nullable String
String! Insert(Int32 aIndex, String aNewValue)
func Insert(_ aIndex: Int32, _ aNewValue: String) -> String
String Insert(Int32 aIndex, String aNewValue)
Function Insert(aIndex As Int32, aNewValue As String) As String

Parameters:

  • aIndex:
  • aNewValue:

IsNullOrEmpty

Check if a string is null or empty.

class method IsNullOrEmpty(value: String): Boolean
static Boolean IsNullOrEmpty(String value)
static func IsNullOrEmpty(_ value: String) -> Boolean
static Boolean IsNullOrEmpty(String value)
Shared Function IsNullOrEmpty(value As String) As Boolean

Parameters:

  • value:

Item

property Item[i: Index]: Char read;
Char Item[Index i] { get; }
subscript Item(_ i: Index) -> Char { get{} }
Char Item[Index i] { __get; }
ReadOnly Property Item(i As Index) As Char

Item

Accessor for this string by index.

property Item[i: Int32]: Char read;
Char Item[Int32 i] { get; }
subscript Item(_ i: Int32) -> Char { get{} }
Char Item[Int32 i] { __get; }
ReadOnly Property Item(i As Int32) As Char

Item

property Item[r: Range]: String read;
String Item[Range r] { get; }
subscript Item(_ r: Range) -> String { get{} }
String Item[Range r] { __get; }
ReadOnly Property Item(r As Range) As String

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: array of Object): not nullable String
static String! Join(String Separator, Object[] Value)
static func Join(_ Separator: String, _ Value: Object...) -> String
static String Join(String Separator, Object[] Value)
Shared Function Join(Separator As String, Value As Object()) As String

Parameters:

  • Separator:
  • Value:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: array of String): not nullable String
static String! Join(String Separator, String[] Value)
static func Join(_ Separator: String, _ Value: String...) -> String
static String Join(String Separator, String[] Value)
Shared Function Join(Separator As String, Value As String()) As String

Parameters:

  • Separator:
  • Value:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: array of String; StartIndex: Int32; Count: Int32): not nullable String
static String! Join(String Separator, String[] Value, Int32 StartIndex, Int32 Count)
static func Join(_ Separator: String, _ Value: String..., _ StartIndex: Int32, _ Count: Int32) -> String
static String Join(String Separator, String[] Value, Int32 StartIndex, Int32 Count)
Shared Function Join(Separator As String, Value As String(), StartIndex As Int32, Count As Int32) As String

Parameters:

  • Separator:
  • Value:
  • StartIndex:
  • Count:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: IEnumerable<String>): not nullable String
static String! Join(String Separator, IEnumerable<String> Value)
static func Join(_ Separator: String, _ Value: IEnumerable<String>) -> String
static String Join(String Separator, IEnumerable<String> Value)
Shared Function Join(Separator As String, Value As IEnumerable<String>) As String

Parameters:

  • Separator:
  • Value:

Join<T>

Join a sequence of objects together with a given seperator.

class method Join<T>(Separator: String; Value: IEnumerable<T>): not nullable String
static String! Join<T>(String Separator, IEnumerable<T> Value)
static func Join<T>(_ Separator: String, _ Value: IEnumerable<T>) -> String
static String Join<T>(String Separator, IEnumerable<T> Value)
Shared Function Join<T>(Separator As String, Value As IEnumerable<T>) As String

Parameters:

  • Separator:
  • Value:

Returns the last index of the substring Value in this string, or -1 if it's not found.

method LastIndexOf(Value: String): Int32
Int32 LastIndexOf(String Value)
func LastIndexOf(_ Value: String) -> Int32
Int32 LastIndexOf(String Value)
Function LastIndexOf(Value As String) As Int32

Parameters:

  • Value:

Returns the last index of the substring Value in this string, or -1 if it's not found.

method LastIndexOf(Value: String; aStartFromIndex: Int32): Int32
Int32 LastIndexOf(String Value, Int32 aStartFromIndex)
func LastIndexOf(_ Value: String, _ aStartFromIndex: Int32) -> Int32
Int32 LastIndexOf(String Value, Int32 aStartFromIndex)
Function LastIndexOf(Value As String, aStartFromIndex As Int32) As Int32

Parameters:

  • Value:
  • aStartFromIndex:

LastIndexOfAny

Returns the last index of any of the characters in the array in this string, or -1 if it's not found.

method LastIndexOfAny(anyOf: array of Char): Int32
Int32 LastIndexOfAny(Char[] anyOf)
func LastIndexOfAny(_ anyOf: Char...) -> Int32
Int32 LastIndexOfAny(Char[] anyOf)
Function LastIndexOfAny(anyOf As Char()) As Int32

Parameters:

  • anyOf:

Length

Returns the length of this string.

property Length: Int32 read;
var Length: Int32 { get{} }
ReadOnly Property Length() As Int32

Adds spacing to the end of a string so it is at least TotalWidth.

method PadEnd(TotalWidth: Int32): not nullable String
String! PadEnd(Int32 TotalWidth)
func PadEnd(_ TotalWidth: Int32) -> String
String PadEnd(Int32 TotalWidth)
Function PadEnd(TotalWidth As Int32) As String

Parameters:

  • TotalWidth:

Adds spacing to the end of a string so it is at least TotalWidth.

method PadEnd(TotalWidth: Int32; PaddingChar: Char): not nullable String
String! PadEnd(Int32 TotalWidth, Char PaddingChar)
func PadEnd(_ TotalWidth: Int32, _ PaddingChar: Char) -> String
String PadEnd(Int32 TotalWidth, Char PaddingChar)
Function PadEnd(TotalWidth As Int32, PaddingChar As Char) As String

Parameters:

  • TotalWidth:
  • PaddingChar:

Adds spacing to the start of a string so it is at least TotalWidth.

method PadStart(TotalWidth: Int32): not nullable String
String! PadStart(Int32 TotalWidth)
func PadStart(_ TotalWidth: Int32) -> String
String PadStart(Int32 TotalWidth)
Function PadStart(TotalWidth As Int32) As String

Parameters:

  • TotalWidth:

Adds spacing to the start of a string so it is at least TotalWidth.

method PadStart(TotalWidth: Int32; PaddingChar: Char): not nullable String
String! PadStart(Int32 TotalWidth, Char PaddingChar)
func PadStart(_ TotalWidth: Int32, _ PaddingChar: Char) -> String
String PadStart(Int32 TotalWidth, Char PaddingChar)
Function PadStart(TotalWidth As Int32, PaddingChar As Char) As String

Parameters:

  • TotalWidth:
  • PaddingChar:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

class method ReferenceEquals(a: Object; b: Object): Boolean
static Boolean ReferenceEquals(Object a, Object b)
static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean
static Boolean ReferenceEquals(Object a, Object b)
Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

Remove from the string from startindex on.

method Remove(StartIndex: Int32): not nullable String
String! Remove(Int32 StartIndex)
func Remove(_ StartIndex: Int32) -> String
String Remove(Int32 StartIndex)
Function Remove(StartIndex As Int32) As String

Parameters:

  • StartIndex:

Remove from the string from startindex on, for a given length.

method Remove(StartIndex: Int32; Count: Int32): not nullable String
String! Remove(Int32 StartIndex, Int32 Count)
func Remove(_ StartIndex: Int32, _ Count: Int32) -> String
String Remove(Int32 StartIndex, Int32 Count)
Function Remove(StartIndex As Int32, Count As Int32) As String

Parameters:

  • StartIndex:
  • Count:

Replace

Replace a substring in a string with another value.

method Replace(OldValue: not nullable String; NewValue: not nullable String): not nullable String
String! Replace(String! OldValue, String! NewValue)
func Replace(_ OldValue: String, _ NewValue: String) -> String
String Replace(String OldValue, String NewValue)
Function Replace(OldValue As String, NewValue As String) As String

Parameters:

  • OldValue:
  • NewValue:

Split

Split a string on a given separator.

method Split(Separator: String; aRemoveEmptyEntries: Boolean := false; aMax: Int32 := -1): not nullable array of String
String[]! Split(String Separator, Boolean aRemoveEmptyEntries = false, Int32 aMax = -1)
func Split(_ Separator: String, _ aRemoveEmptyEntries: Boolean = false, _ aMax: Int32 = -1) -> String...
String[] Split(String Separator, Boolean aRemoveEmptyEntries, Int32 aMax)
Function Split(Separator As String, aRemoveEmptyEntries As Boolean = false, aMax As Int32 = -1) As String()

Parameters:

  • Separator:
  • aRemoveEmptyEntries:
  • aMax:

StartsWith

Returns if a string starts with a value.

method StartsWith(Value: String; aInvariant: Boolean := false): Boolean
Boolean StartsWith(String Value, Boolean aInvariant = false)
func StartsWith(_ Value: String, _ aInvariant: Boolean = false) -> Boolean
Boolean StartsWith(String Value, Boolean aInvariant)
Function StartsWith(Value As String, aInvariant As Boolean = false) As Boolean

Parameters:

  • Value:
  • aInvariant:

method Substring(aRange: Range): not nullable String
String! Substring(Range aRange)
func Substring(_ aRange: Range) -> String
String Substring(Range aRange)
Function Substring(aRange As Range) As String

Parameters:

  • aRange:

Returns a substring of this string.

method Substring(StartIndex: Int32): not nullable String
String! Substring(Int32 StartIndex)
func Substring(_ StartIndex: Int32) -> String
String Substring(Int32 StartIndex)
Function Substring(StartIndex As Int32) As String

Parameters:

  • StartIndex:

Returns a substring of this string.

method Substring(StartIndex: Int32; aLength: Int32): not nullable String
String! Substring(Int32 StartIndex, Int32 aLength)
func Substring(_ StartIndex: Int32, _ aLength: Int32) -> String
String Substring(Int32 StartIndex, Int32 aLength)
Function Substring(StartIndex As Int32, aLength As Int32) As String

Parameters:

  • StartIndex:
  • aLength:

ToAnsiChars

Convert this string to an array of ansichar.

method ToAnsiChars(aNullTerminate: Boolean := false): array of AnsiChar
AnsiChar[] ToAnsiChars(Boolean aNullTerminate = false)
func ToAnsiChars(_ aNullTerminate: Boolean = false) -> AnsiChar...
AnsiChar[] ToAnsiChars(Boolean aNullTerminate)
Function ToAnsiChars(aNullTerminate As Boolean = false) As AnsiChar()

Parameters:

  • aNullTerminate:

Convert this string to an array of char.

method ToCharArray(aNullTerminate: Boolean := false): array of Char
Char[] ToCharArray(Boolean aNullTerminate = false)
func ToCharArray(_ aNullTerminate: Boolean = false) -> Char...
Char[] ToCharArray(Boolean aNullTerminate)
Function ToCharArray(aNullTerminate As Boolean = false) As Char()

Parameters:

  • aNullTerminate:

Convert this string to an array of char.

method ToCharArray(StartIndex: Int32; aLength: Int32; aNullTerminate: Boolean := false): array of Char
Char[] ToCharArray(Int32 StartIndex, Int32 aLength, Boolean aNullTerminate = false)
func ToCharArray(_ StartIndex: Int32, _ aLength: Int32, _ aNullTerminate: Boolean = false) -> Char...
Char[] ToCharArray(Int32 StartIndex, Int32 aLength, Boolean aNullTerminate)
Function ToCharArray(StartIndex As Int32, aLength As Int32, aNullTerminate As Boolean = false) As Char()

Parameters:

  • StartIndex:
  • aLength:
  • aNullTerminate:

Lowercase this string.

method ToLower(aInvariant: Boolean := false): not nullable String
String! ToLower(Boolean aInvariant = false)
func ToLower(_ aInvariant: Boolean = false) -> String
String ToLower(Boolean aInvariant)
Function ToLower(aInvariant As Boolean = false) As String

Parameters:

  • aInvariant:

Lowercase this string.

method ToLower(aLocale: Locale): not nullable String
String! ToLower(Locale aLocale)
func ToLower(_ aLocale: Locale) -> String
String ToLower(Locale aLocale)
Function ToLower(aLocale As Locale) As String

Parameters:

  • aLocale:

ToLowerInvariant

Lowercase this string.

method ToLowerInvariant: not nullable String
String! ToLowerInvariant()
func ToLowerInvariant() -> String
String ToLowerInvariant()
Function ToLowerInvariant() As String

ToString  override virtual

Returns itself.

func ToString() -> String
Function ToString() As String

Uppercase this string.

method ToUpper(aInvariant: Boolean := false): not nullable String
String! ToUpper(Boolean aInvariant = false)
func ToUpper(_ aInvariant: Boolean = false) -> String
String ToUpper(Boolean aInvariant)
Function ToUpper(aInvariant As Boolean = false) As String

Parameters:

  • aInvariant:

Uppercase this string.

method ToUpper(aLocale: Locale): not nullable String
String! ToUpper(Locale aLocale)
func ToUpper(_ aLocale: Locale) -> String
String ToUpper(Locale aLocale)
Function ToUpper(aLocale As Locale) As String

Parameters:

  • aLocale:

ToUpperInvariant

Uppercase this string.

method ToUpperInvariant: not nullable String
String! ToUpperInvariant()
func ToUpperInvariant() -> String
String ToUpperInvariant()
Function ToUpperInvariant() As String

Trim

Trim this string at the start and end of whitespace characters.

method Trim: not nullable String
Function Trim() As String

Trim (array of Char): not nullable String

Trim this string at the start and end of aChars characters.

method Trim(aChars: array of Char): not nullable String
String! Trim(Char[] aChars)
func Trim(_ aChars: Char...) -> String
String Trim(Char[] aChars)
Function Trim(aChars As Char()) As String

Parameters:

  • aChars:

TrimEnd

Trim this string at the end of whitespace characters.

method TrimEnd: not nullable String
Function TrimEnd() As String

TrimEnd (array of Char): not nullable String

Trim this string at the end of aChars characters.

method TrimEnd(aChars: array of Char): not nullable String
String! TrimEnd(Char[] aChars)
func TrimEnd(_ aChars: Char...) -> String
String TrimEnd(Char[] aChars)
Function TrimEnd(aChars As Char()) As String

Parameters:

  • aChars:

TrimStart

Trim this string at the start of whitespace characters.

method TrimStart: not nullable String
func TrimStart() -> String
Function TrimStart() As String

TrimStart (array of Char): not nullable String

Trim this string at the start of aChars characters.

method TrimStart(aChars: array of Char): not nullable String
String! TrimStart(Char[] aChars)
func TrimStart(_ aChars: Char...) -> String
String TrimStart(Char[] aChars)
Function TrimStart(aChars As Char()) As String

Parameters:

  • aChars:

FirstChar

Returns a pointer to the first char of this string.

property FirstChar: ^Char read;
var FirstChar: UnsafeMutablePointer<Char> { get{} }
Char* FirstChar { __get; }
ReadOnly Property FirstChar() As Ptr(Of Char)

Item

property Item[i: Index]: Char read;
Char Item[Index i] { get; }
subscript Item(_ i: Index) -> Char { get{} }
Char Item[Index i] { __get; }
ReadOnly Property Item(i As Index) As Char

Item

Accessor for this string by index.

property Item[i: Int32]: Char read;
Char Item[Int32 i] { get; }
subscript Item(_ i: Int32) -> Char { get{} }
Char Item[Int32 i] { __get; }
ReadOnly Property Item(i As Int32) As Char

Item

property Item[r: Range]: String read;
String Item[Range r] { get; }
subscript Item(_ r: Range) -> String { get{} }
String Item[Range r] { __get; }
ReadOnly Property Item(r As Range) As String

Length

Returns the length of this string.

property Length: Int32 read;
var Length: Int32 { get{} }
ReadOnly Property Length() As Int32

Compare

Compares two strings, returns 0 if equal, -1 if less, 1 if more.

class method Compare(aLeft: String; aRight: String): Int32
static Int32 Compare(String aLeft, String aRight)
static func Compare(_ aLeft: String, _ aRight: String) -> Int32
static Int32 Compare(String aLeft, String aRight)
Shared Function Compare(aLeft As String, aRight As String) As Int32

Parameters:

  • aLeft:
  • aRight:

Format

Format a string given a format string (.net style formatting).

class method Format(aFormat: not nullable String; params aArguments: not nullable array of Object): not nullable String
static String! Format(String! aFormat, params Object[]! aArguments)
static func Format(_ aFormat: String, _ aArguments: Object...) -> String
static String Format(String aFormat, Object[]... aArguments)
Shared Function Format(aFormat As String, ParamArray aArguments As Object()) As String

Parameters:

  • aFormat:
  • aArguments:

FromChar

Creates a string from a char.

class method FromChar(c: Char): nullable String
static String? FromChar(Char c)
static func FromChar(_ c: Char) -> String?
static String FromChar(Char c)
Shared Function FromChar(c As Char) As String?

Parameters:

  • c:

FromCharArray

Creates a string from a char array.

class method FromCharArray(aArray: array of Char): nullable String
static String? FromCharArray(Char[] aArray)
static func FromCharArray(_ aArray: Char...) -> String?
static String FromCharArray(Char[] aArray)
Shared Function FromCharArray(aArray As Char()) As String?

Parameters:

  • aArray:

class method FromPAnsiChar(c: ^AnsiChar): nullable String
static String? FromPAnsiChar(AnsiChar* c)
static func FromPAnsiChar(_ c: UnsafeMutablePointer<AnsiChar>) -> String?
static String FromPAnsiChar(AnsiChar* c)
Shared Function FromPAnsiChar(c As Ptr(Of AnsiChar)) As String?

Parameters:

  • c:

class method FromPAnsiChar(c: ^AnsiChar; aCharCount: Int32): nullable String
static String? FromPAnsiChar(AnsiChar* c, Int32 aCharCount)
static func FromPAnsiChar(_ c: UnsafeMutablePointer<AnsiChar>, _ aCharCount: Int32) -> String?
static String FromPAnsiChar(AnsiChar* c, Int32 aCharCount)
Shared Function FromPAnsiChar(c As Ptr(Of AnsiChar), aCharCount As Int32) As String?

Parameters:

  • c:
  • aCharCount:

Creates a string from an unicode char pointer.

class method FromPChar(c: ^Char): nullable String
static String? FromPChar(Char* c)
static func FromPChar(_ c: UnsafeMutablePointer<Char>) -> String?
static String FromPChar(Char* c)
Shared Function FromPChar(c As Ptr(Of Char)) As String?

Parameters:

  • c:

Creates a string from an unicode char pointer.

class method FromPChar(c: ^Char; aCharCount: Int32): nullable String
static String? FromPChar(Char* c, Int32 aCharCount)
static func FromPChar(_ c: UnsafeMutablePointer<Char>, _ aCharCount: Int32) -> String?
static String FromPChar(Char* c, Int32 aCharCount)
Shared Function FromPChar(c As Ptr(Of Char), aCharCount As Int32) As String?

Parameters:

  • c:
  • aCharCount:

FromRepeatedChar

Creates a string from a repeated character.

class method FromRepeatedChar(c: Char; aCharCount: Int32): not nullable String
static String! FromRepeatedChar(Char c, Int32 aCharCount)
static func FromRepeatedChar(_ c: Char, _ aCharCount: Int32) -> String
static String FromRepeatedChar(Char c, Int32 aCharCount)
Shared Function FromRepeatedChar(c As Char, aCharCount As Int32) As String

Parameters:

  • c:
  • aCharCount:

IsNullOrEmpty

Check if a string is null or empty.

class method IsNullOrEmpty(value: String): Boolean
static Boolean IsNullOrEmpty(String value)
static func IsNullOrEmpty(_ value: String) -> Boolean
static Boolean IsNullOrEmpty(String value)
Shared Function IsNullOrEmpty(value As String) As Boolean

Parameters:

  • value:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: array of Object): not nullable String
static String! Join(String Separator, Object[] Value)
static func Join(_ Separator: String, _ Value: Object...) -> String
static String Join(String Separator, Object[] Value)
Shared Function Join(Separator As String, Value As Object()) As String

Parameters:

  • Separator:
  • Value:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: array of String): not nullable String
static String! Join(String Separator, String[] Value)
static func Join(_ Separator: String, _ Value: String...) -> String
static String Join(String Separator, String[] Value)
Shared Function Join(Separator As String, Value As String()) As String

Parameters:

  • Separator:
  • Value:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: array of String; StartIndex: Int32; Count: Int32): not nullable String
static String! Join(String Separator, String[] Value, Int32 StartIndex, Int32 Count)
static func Join(_ Separator: String, _ Value: String..., _ StartIndex: Int32, _ Count: Int32) -> String
static String Join(String Separator, String[] Value, Int32 StartIndex, Int32 Count)
Shared Function Join(Separator As String, Value As String(), StartIndex As Int32, Count As Int32) As String

Parameters:

  • Separator:
  • Value:
  • StartIndex:
  • Count:

Join a sequence of strings together with a given seperator.

class method Join(Separator: String; Value: IEnumerable<String>): not nullable String
static String! Join(String Separator, IEnumerable<String> Value)
static func Join(_ Separator: String, _ Value: IEnumerable<String>) -> String
static String Join(String Separator, IEnumerable<String> Value)
Shared Function Join(Separator As String, Value As IEnumerable<String>) As String

Parameters:

  • Separator:
  • Value:

Join<T>

Join a sequence of objects together with a given seperator.

class method Join<T>(Separator: String; Value: IEnumerable<T>): not nullable String
static String! Join<T>(String Separator, IEnumerable<T> Value)
static func Join<T>(_ Separator: String, _ Value: IEnumerable<T>) -> String
static String Join<T>(String Separator, IEnumerable<T> Value)
Shared Function Join<T>(Separator As String, Value As IEnumerable<T>) As String

Parameters:

  • Separator:
  • Value:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

class method ReferenceEquals(a: Object; b: Object): Boolean
static Boolean ReferenceEquals(Object a, Object b)
static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean
static Boolean ReferenceEquals(Object a, Object b)
Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

constructor    (declared in Object)


Compares two strings, returns 0 if equal, -1 if less, 1 if more.

method CompareTo(a: Object): Int32
Int32 CompareTo(Object a)
func CompareTo(_ a: Object) -> Int32
Int32 CompareTo(Object a)
Function CompareTo(a As Object) As Int32

Parameters:

  • a:

Compares two strings, returns 0 if equal, -1 if less, 1 if more.

method CompareTo(Value: String): Int32
Int32 CompareTo(String Value)
func CompareTo(_ Value: String) -> Int32
Int32 CompareTo(String Value)
Function CompareTo(Value As String) As Int32

Parameters:

  • Value:

CompareToIgnoreCase

Compares two strings, returns 0 if equal, -1 if less, 1 if more, ignoring the case.

method CompareToIgnoreCase(Value: String): Int32
Int32 CompareToIgnoreCase(String Value)
func CompareToIgnoreCase(_ Value: String) -> Int32
Int32 CompareToIgnoreCase(String Value)
Function CompareToIgnoreCase(Value As String) As Int32

Parameters:

  • Value:

Contains

Check if a string is contained in another string.

method Contains(Value: String): Boolean
Boolean Contains(String Value)
func Contains(_ Value: String) -> Boolean
Boolean Contains(String Value)
Function Contains(Value As String) As Boolean

Parameters:

  • Value:

CopyTo

method CopyTo(SourceIndex: Int32; destination: array of Char; DestinationIndex: Int32; Count: Int32)
void CopyTo(Int32 SourceIndex, Char[] destination, Int32 DestinationIndex, Int32 Count)
func CopyTo(_ SourceIndex: Int32, _ destination: Char..., _ DestinationIndex: Int32, _ Count: Int32)
void CopyTo(Int32 SourceIndex, Char[] destination, Int32 DestinationIndex, Int32 Count)
Sub CopyTo(SourceIndex As Int32, destination As Char(), DestinationIndex As Int32, Count As Int32)

Parameters:

  • SourceIndex:
  • destination:
  • DestinationIndex:
  • Count:

EndsWith

Returns true if a string ends with a value.

method EndsWith(Value: String; aInvariant: Boolean := false): Boolean
Boolean EndsWith(String Value, Boolean aInvariant = false)
func EndsWith(_ Value: String, _ aInvariant: Boolean = false) -> Boolean
Boolean EndsWith(String Value, Boolean aInvariant)
Function EndsWith(Value As String, aInvariant As Boolean = false) As Boolean

Parameters:

  • Value:
  • aInvariant:

Copy a string to an array of char.

method Equals(aOther: Object): Boolean
Boolean Equals(Object aOther)
func Equals(_ aOther: Object) -> Boolean
Boolean Equals(Object aOther)
Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Copy a string to an array of char.

method Equals(aOther: String): Boolean
Boolean Equals(String aOther)
func Equals(_ aOther: String) -> Boolean
Boolean Equals(String aOther)
Function Equals(aOther As String) As Boolean

Parameters:

  • aOther:

EqualsIgnoreCase

Copy a string to an array of char.

method EqualsIgnoreCase(aOther: String): Boolean
Boolean EqualsIgnoreCase(String aOther)
func EqualsIgnoreCase(_ aOther: String) -> Boolean
Boolean EqualsIgnoreCase(String aOther)
Function EqualsIgnoreCase(aOther As String) As Boolean

Parameters:

  • aOther:

EqualsIgnoreCaseInvariant

Copy a string to an array of char.

method EqualsIgnoreCaseInvariant(aOther: String): Boolean
Boolean EqualsIgnoreCaseInvariant(String aOther)
func EqualsIgnoreCaseInvariant(_ aOther: String) -> Boolean
Boolean EqualsIgnoreCaseInvariant(String aOther)
Function EqualsIgnoreCaseInvariant(aOther As String) As Boolean

Parameters:

  • aOther:

Finalize  protected virtual    (declared in Object)


GetEnumerator

Returns an iterator for this class.

method GetEnumerator: IEnumerator<Char>
IEnumerator<Char> GetEnumerator()
func GetEnumerator() -> IEnumerator<Char>
IEnumerator<Char> GetEnumerator()
Function GetEnumerator() As IEnumerator<Char>

GetHashCode  override virtual

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

method GetHashCode: Int32
func GetHashCode() -> Int32
Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

Function GetType() As Type

Returns the index of the substring Value in this string, or -1 if it's not found.

method IndexOf(Value: String): Int32
Int32 IndexOf(String Value)
func IndexOf(_ Value: String) -> Int32
Int32 IndexOf(String Value)
Function IndexOf(Value As String) As Int32

Parameters:

  • Value:

Returns the index of the substring Value in this string, or -1 if it's not found; starts searching at aStartfromIndex.

method IndexOf(Value: String; aStartFromIndex: Int32): Int32
Int32 IndexOf(String Value, Int32 aStartFromIndex)
func IndexOf(_ Value: String, _ aStartFromIndex: Int32) -> Int32
Int32 IndexOf(String Value, Int32 aStartFromIndex)
Function IndexOf(Value As String, aStartFromIndex As Int32) As Int32

Parameters:

  • Value:
  • aStartFromIndex:

IndexOfAny

Returns the index of any char in the array or -1 if it's not there.

method IndexOfAny(anyOf: array of Char): Int32
Int32 IndexOfAny(Char[] anyOf)
func IndexOfAny(_ anyOf: Char...) -> Int32
Int32 IndexOfAny(Char[] anyOf)
Function IndexOfAny(anyOf As Char()) As Int32

Parameters:

  • anyOf:

Insert

Insert a string at the given position and return the new strnig

method Insert(aIndex: Int32; aNewValue: String): not nullable String
String! Insert(Int32 aIndex, String aNewValue)
func Insert(_ aIndex: Int32, _ aNewValue: String) -> String
String Insert(Int32 aIndex, String aNewValue)
Function Insert(aIndex As Int32, aNewValue As String) As String

Parameters:

  • aIndex:
  • aNewValue:

Returns the last index of the substring Value in this string, or -1 if it's not found.

method LastIndexOf(Value: String): Int32
Int32 LastIndexOf(String Value)
func LastIndexOf(_ Value: String) -> Int32
Int32 LastIndexOf(String Value)
Function LastIndexOf(Value As String) As Int32

Parameters:

  • Value:

Returns the last index of the substring Value in this string, or -1 if it's not found.

method LastIndexOf(Value: String; aStartFromIndex: Int32): Int32
Int32 LastIndexOf(String Value, Int32 aStartFromIndex)
func LastIndexOf(_ Value: String, _ aStartFromIndex: Int32) -> Int32
Int32 LastIndexOf(String Value, Int32 aStartFromIndex)
Function LastIndexOf(Value As String, aStartFromIndex As Int32) As Int32

Parameters:

  • Value:
  • aStartFromIndex:

LastIndexOfAny

Returns the last index of any of the characters in the array in this string, or -1 if it's not found.

method LastIndexOfAny(anyOf: array of Char): Int32
Int32 LastIndexOfAny(Char[] anyOf)
func LastIndexOfAny(_ anyOf: Char...) -> Int32
Int32 LastIndexOfAny(Char[] anyOf)
Function LastIndexOfAny(anyOf As Char()) As Int32

Parameters:

  • anyOf:

Adds spacing to the end of a string so it is at least TotalWidth.

method PadEnd(TotalWidth: Int32): not nullable String
String! PadEnd(Int32 TotalWidth)
func PadEnd(_ TotalWidth: Int32) -> String
String PadEnd(Int32 TotalWidth)
Function PadEnd(TotalWidth As Int32) As String

Parameters:

  • TotalWidth:

Adds spacing to the end of a string so it is at least TotalWidth.

method PadEnd(TotalWidth: Int32; PaddingChar: Char): not nullable String
String! PadEnd(Int32 TotalWidth, Char PaddingChar)
func PadEnd(_ TotalWidth: Int32, _ PaddingChar: Char) -> String
String PadEnd(Int32 TotalWidth, Char PaddingChar)
Function PadEnd(TotalWidth As Int32, PaddingChar As Char) As String

Parameters:

  • TotalWidth:
  • PaddingChar:

Adds spacing to the start of a string so it is at least TotalWidth.

method PadStart(TotalWidth: Int32): not nullable String
String! PadStart(Int32 TotalWidth)
func PadStart(_ TotalWidth: Int32) -> String
String PadStart(Int32 TotalWidth)
Function PadStart(TotalWidth As Int32) As String

Parameters:

  • TotalWidth:

Adds spacing to the start of a string so it is at least TotalWidth.

method PadStart(TotalWidth: Int32; PaddingChar: Char): not nullable String
String! PadStart(Int32 TotalWidth, Char PaddingChar)
func PadStart(_ TotalWidth: Int32, _ PaddingChar: Char) -> String
String PadStart(Int32 TotalWidth, Char PaddingChar)
Function PadStart(TotalWidth As Int32, PaddingChar As Char) As String

Parameters:

  • TotalWidth:
  • PaddingChar:

Remove from the string from startindex on.

method Remove(StartIndex: Int32): not nullable String
String! Remove(Int32 StartIndex)
func Remove(_ StartIndex: Int32) -> String
String Remove(Int32 StartIndex)
Function Remove(StartIndex As Int32) As String

Parameters:

  • StartIndex:

Remove from the string from startindex on, for a given length.

method Remove(StartIndex: Int32; Count: Int32): not nullable String
String! Remove(Int32 StartIndex, Int32 Count)
func Remove(_ StartIndex: Int32, _ Count: Int32) -> String
String Remove(Int32 StartIndex, Int32 Count)
Function Remove(StartIndex As Int32, Count As Int32) As String

Parameters:

  • StartIndex:
  • Count:

Replace

Replace a substring in a string with another value.

method Replace(OldValue: not nullable String; NewValue: not nullable String): not nullable String
String! Replace(String! OldValue, String! NewValue)
func Replace(_ OldValue: String, _ NewValue: String) -> String
String Replace(String OldValue, String NewValue)
Function Replace(OldValue As String, NewValue As String) As String

Parameters:

  • OldValue:
  • NewValue:

Split

Split a string on a given separator.

method Split(Separator: String; aRemoveEmptyEntries: Boolean := false; aMax: Int32 := -1): not nullable array of String
String[]! Split(String Separator, Boolean aRemoveEmptyEntries = false, Int32 aMax = -1)
func Split(_ Separator: String, _ aRemoveEmptyEntries: Boolean = false, _ aMax: Int32 = -1) -> String...
String[] Split(String Separator, Boolean aRemoveEmptyEntries, Int32 aMax)
Function Split(Separator As String, aRemoveEmptyEntries As Boolean = false, aMax As Int32 = -1) As String()

Parameters:

  • Separator:
  • aRemoveEmptyEntries:
  • aMax:

StartsWith

Returns if a string starts with a value.

method StartsWith(Value: String; aInvariant: Boolean := false): Boolean
Boolean StartsWith(String Value, Boolean aInvariant = false)
func StartsWith(_ Value: String, _ aInvariant: Boolean = false) -> Boolean
Boolean StartsWith(String Value, Boolean aInvariant)
Function StartsWith(Value As String, aInvariant As Boolean = false) As Boolean

Parameters:

  • Value:
  • aInvariant:

method Substring(aRange: Range): not nullable String
String! Substring(Range aRange)
func Substring(_ aRange: Range) -> String
String Substring(Range aRange)
Function Substring(aRange As Range) As String

Parameters:

  • aRange:

Returns a substring of this string.

method Substring(StartIndex: Int32): not nullable String
String! Substring(Int32 StartIndex)
func Substring(_ StartIndex: Int32) -> String
String Substring(Int32 StartIndex)
Function Substring(StartIndex As Int32) As String

Parameters:

  • StartIndex:

Returns a substring of this string.

method Substring(StartIndex: Int32; aLength: Int32): not nullable String
String! Substring(Int32 StartIndex, Int32 aLength)
func Substring(_ StartIndex: Int32, _ aLength: Int32) -> String
String Substring(Int32 StartIndex, Int32 aLength)
Function Substring(StartIndex As Int32, aLength As Int32) As String

Parameters:

  • StartIndex:
  • aLength:

ToAnsiChars

Convert this string to an array of ansichar.

method ToAnsiChars(aNullTerminate: Boolean := false): array of AnsiChar
AnsiChar[] ToAnsiChars(Boolean aNullTerminate = false)
func ToAnsiChars(_ aNullTerminate: Boolean = false) -> AnsiChar...
AnsiChar[] ToAnsiChars(Boolean aNullTerminate)
Function ToAnsiChars(aNullTerminate As Boolean = false) As AnsiChar()

Parameters:

  • aNullTerminate:

Convert this string to an array of char.

method ToCharArray(aNullTerminate: Boolean := false): array of Char
Char[] ToCharArray(Boolean aNullTerminate = false)
func ToCharArray(_ aNullTerminate: Boolean = false) -> Char...
Char[] ToCharArray(Boolean aNullTerminate)
Function ToCharArray(aNullTerminate As Boolean = false) As Char()

Parameters:

  • aNullTerminate:

Convert this string to an array of char.

method ToCharArray(StartIndex: Int32; aLength: Int32; aNullTerminate: Boolean := false): array of Char
Char[] ToCharArray(Int32 StartIndex, Int32 aLength, Boolean aNullTerminate = false)
func ToCharArray(_ StartIndex: Int32, _ aLength: Int32, _ aNullTerminate: Boolean = false) -> Char...
Char[] ToCharArray(Int32 StartIndex, Int32 aLength, Boolean aNullTerminate)
Function ToCharArray(StartIndex As Int32, aLength As Int32, aNullTerminate As Boolean = false) As Char()

Parameters:

  • StartIndex:
  • aLength:
  • aNullTerminate:

Lowercase this string.

method ToLower(aInvariant: Boolean := false): not nullable String
String! ToLower(Boolean aInvariant = false)
func ToLower(_ aInvariant: Boolean = false) -> String
String ToLower(Boolean aInvariant)
Function ToLower(aInvariant As Boolean = false) As String

Parameters:

  • aInvariant:

Lowercase this string.

method ToLower(aLocale: Locale): not nullable String
String! ToLower(Locale aLocale)
func ToLower(_ aLocale: Locale) -> String
String ToLower(Locale aLocale)
Function ToLower(aLocale As Locale) As String

Parameters:

  • aLocale:

ToLowerInvariant

Lowercase this string.

method ToLowerInvariant: not nullable String
String! ToLowerInvariant()
func ToLowerInvariant() -> String
String ToLowerInvariant()
Function ToLowerInvariant() As String

ToString  override virtual

Returns itself.

func ToString() -> String
Function ToString() As String

Uppercase this string.

method ToUpper(aInvariant: Boolean := false): not nullable String
String! ToUpper(Boolean aInvariant = false)
func ToUpper(_ aInvariant: Boolean = false) -> String
String ToUpper(Boolean aInvariant)
Function ToUpper(aInvariant As Boolean = false) As String

Parameters:

  • aInvariant:

Uppercase this string.

method ToUpper(aLocale: Locale): not nullable String
String! ToUpper(Locale aLocale)
func ToUpper(_ aLocale: Locale) -> String
String ToUpper(Locale aLocale)
Function ToUpper(aLocale As Locale) As String

Parameters:

  • aLocale:

ToUpperInvariant

Uppercase this string.

method ToUpperInvariant: not nullable String
String! ToUpperInvariant()
func ToUpperInvariant() -> String
String ToUpperInvariant()
Function ToUpperInvariant() As String

Trim

Trim this string at the start and end of whitespace characters.

method Trim: not nullable String
Function Trim() As String

Trim (array of Char): not nullable String

Trim this string at the start and end of aChars characters.

method Trim(aChars: array of Char): not nullable String
String! Trim(Char[] aChars)
func Trim(_ aChars: Char...) -> String
String Trim(Char[] aChars)
Function Trim(aChars As Char()) As String

Parameters:

  • aChars:

TrimEnd

Trim this string at the end of whitespace characters.

method TrimEnd: not nullable String
Function TrimEnd() As String

TrimEnd (array of Char): not nullable String

Trim this string at the end of aChars characters.

method TrimEnd(aChars: array of Char): not nullable String
String! TrimEnd(Char[] aChars)
func TrimEnd(_ aChars: Char...) -> String
String TrimEnd(Char[] aChars)
Function TrimEnd(aChars As Char()) As String

Parameters:

  • aChars:

TrimStart

Trim this string at the start of whitespace characters.

method TrimStart: not nullable String
func TrimStart() -> String
Function TrimStart() As String

TrimStart (array of Char): not nullable String

Trim this string at the start of aChars characters.

method TrimStart(aChars: array of Char): not nullable String
String! TrimStart(Char[] aChars)
func TrimStart(_ aChars: Char...) -> String
String TrimStart(Char[] aChars)
Function TrimStart(aChars As Char()) As String

Parameters:

  • aChars: