Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Class  >  string
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.

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.

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.

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()

Gets a new instance of the string that removed all leading and trailing whitespace characters from the invoker string.

TrimEnd()

Gets a new instance of the string that removed all trailing whitespace characters from the invoker string.

TrimStart()

Gets a new instance of the string that removed all leading whitespace characters from the invoker string.

Copyright © Rice All rights reserved.