string class

Description

Represents a string.

Notes

This class is a standard built-in class in the Rice language.

Instance that is created by declaration have been already initialized.

The initial value is empty string.

fitter

SignatureDescription
string()

Get a new instance of string class with initial value.

string(string)

Get a new instance of string class with the same value as the argument.

getter

SignatureDescription
CR

Gets a string that represents the carriage return.

DQ

Gets a string that represents the double quote.

Fitted

Gets the value that indicates whether this instance was already initialized.

Length

Gets a number of characters in the instance.

LF

Gets a string that represents the line feed.

NL

Gets a string that represents the new line.

S

Gets a new instance with the same value as the calling instance.

TAB

Gets a string that represents the tab.

TypeName

Gets the type name.

setter

SignatureDescription
Value(string)

This setter will change only the value without changing the reference value.

method

SignatureDescription
Clone()

Gets a new instance with the same value as the calling instance.

Contains(string)

It returns a boolean value that represents whether argument contains in the caller string.

EndsWith(string)

It returns a boolean value that represents whether caller string ends with argument.

IndexOf(string)

Gets the index of the first occurrence of the specified string in the invoker string.

IndexOf(string,int)

Gets the index of the first occurrence of the specified string in the invoker string.

Insert(int,string)

Gets a new string which a specified string is inserted at a specified position in this instance.

LastIndexOf(string)

Gets the index of the last occurrence of the specified string in the caller string.

LastIndexOf(string,int)

Gets the index of the last occurrence of the specified string in the caller string.

PadEnd(int)

It returns a new string that is added blanks of the specified length to the end of the caller string.

PadEnd(int,string)

It concatenates a string that specified string has been repeated a specified number of times to the end of caller string and returns it as new string.

PadStart(int)

It returns a new string that is added blanks of the specified length to the top of the caller string.

PadStart(int,string)

It concatenates a string that specified string has been repeated a specified number of times to the top of caller string and returns it as new string.

ParseToInt()

Converts the string to the instance of the int type.

ParseToLong()

Converts the string to the instance of the long type.

ParseToReal()

Converts the string to the instance of the real type.

PeelDQ

Returns a string that removed the double quotes at the beginning and end of the caller.

Remove(string)

Gets a new instance of the string which the specified string was deleted.

Remove(int)

Gets a new instance of the string that have been removed from the specified position to the end.

Remove(int,int)

Gets a new instance of the string that have removed the specified number of characters from the specified position.

RemoveFromTop(int)

Gets a new instance of the string that have removed the specified number of characters from the top.

RemoveFromEnd(int)

Gets a new instance of the string that have removed the specified number of characters from the end.

Repeat(int)

Gets a new instance of the string that have repeated the invoker string.

Replace(string,string)

Gets a new instance of the string in which all occurrences of a specified string in the invoker string are replaced with specified string.

Reverse()

Gets a new string in which the character order of a invoker string is reversed.

Split(string,bool)

Gets a list of the string that splits the invoker string by a specified string. You can specify whether the result includes empty string.

StartsWith(string)

It returns a boolean value that represents whether caller string starts with argument.

SubString(int)

Gets a new instance of the string that is from the position that specified by the index to the end of the invoker string.

SubString(int,int)

Gets a new instance of the string that taken out the specified number of characters from the specified position.

ToNL(string)

Gets a new string replaced the specified string with a newline.

ToDQ(string)

Gets a new string replaced the specified string with a double quote character.

ToLF(string)

Gets a new string replaced the specified string with a line feed character.

ToCR(string)

Gets a new string replaced the specified string with a crriage return character.

ToTAB(string)

Gets a new string replaced the specified string with a tab character.

ToLower()

Gets a new instance of the string that uppercase in the invoker string converts to lowercase.

ToUpper()

Gets a new instance of the string that lowercase in the invoker string converts to uppercase.

Trim()

Returns a string that removed whitespace characters at the beginning and end of the caller.

Trim(string)

Returns a string that removed specified characters at the beginning and end of the caller.

TrimEnd()

Returns a string that removed whitespace characters at the end of the caller.

TrimEnd(string)

Returns a string that removed specified characters at the end of the caller.

TrimStart()

Returns a string that removed whitespace characters at the beginning of the caller.

TrimStart(string)

Returns a string that removed specified characters at the beginning of the caller.

Copyright © Rice All rights reserved.