SalString

PPJ.Runtime.SalString

Namespace: PPJ.Runtime

Assembly: PPJ.Web.49 (4.9.0.0)

SAL String basic type. It wraps .NET String class. SalString objects are automatically cast to and from .NET String type.

public class SalString : IComparable, IConvertible, IFormattable, INullable, ISalType, IXmlSerializable, IWisejSerializable

Constructors

SalString()

Constructs a new SalString object containing an empty string.

SalString(x)

Constructs a new SalString object.

Name
Type
Description

SalString(chars)

Constructs a new SalString object.

Name
Type
Description

chars

SalString(chars, index, length)

Constructs a new SalString object.

Name
Type
Description

chars

index

length

SalString(blob)

Constructs a new SalString object.

Name
Type
Description

blob

SalString(blob, index, length)

Constructs a new SalString object.

Name
Type
Description

blob

index

length

Fields

Name
Type
Description

Empty

empty value

Null

null value

NullBlob

null value for blobs

Properties

IsBlob

Boolean: Blob flag.

IsEmpty

Boolean: Checks if this SalString object contains a null value or is empty.

IsNull

Boolean: Checks if this SalString object contains a null value.

Item(index)

Char: Character indexer

Length

SalNumber: Returns the string's length up to the terminator char.

Value

String: Returns the inner string value

Methods

Clone()

Returns a copy of this string.

Returns: SalString.

Compare(x, y)

Compares two strings lexicographically to match SAL comparison rules. SAL apparently uses _xcmp().

Parameter
Type
Description

Returns: Int32.

CompareTo(obj)

Compare to an object

Parameter
Type
Description

Returns: Int32.

CompareTo(x)

Compare to a SalString

Parameter
Type
Description

Returns: Int32.

Compress()

Compresses the string.

Returns: SalString.

Compress(sRet)

Parameter
Type
Description

Returns: Boolean.

Concat(x, y)

  • operator for concatenating two SalString objects.

Parameter
Type
Description

Returns: SalString.

FirstChar(target, charCode)

Parameter
Type
Description

charCode

Returns: Boolean.

FreeHandle(handle)

Frees a string handle created using SalHStringTonumber.

Parameter
Type
Description

handle

String handle to release.

FromHandle(handle, free)

Converts a number (string handle) to a string.

Parameter
Type
Description

handle

The handle to convert back to a string.

free

Indicates that the handle should be released. The default is false.

Returns: SalString.

FromHandleOnce(handle)

Converts a number (string handle) to a string and releases the handle immediately.

Parameter
Type
Description

handle

The handle to convert back to a string.

Returns: SalString.

FromHex(hex)

Decodes a hexadecimal string into a string.

Parameter
Type
Description

Returns: SalString.

GetBlob()

Returns the string content as an array of bytes.

Returns: Byte[].

GetBufferLength()

Returns the current buffer length of the string.

Returns: SalNumber. nLength

IsValidCurrency(precision, scale)

Verifies that an entire character string represents a valid currency value.

Parameter
Type
Description

precision

scale

Returns: Boolean.

IsValidCurrency(precision, scale, provider)

Verifies that an entire character string represents a valid currency value.

Parameter
Type
Description

precision

scale

Returns: Boolean.

IsValidCurrency(precision, scale, format, provider)

Verifies that an entire character string represents a valid currency value.

Parameter
Type
Description

precision

scale

format

Returns: Boolean.

IsValidDateTime()

Verifies that an entire character string represents a valid date/time value.

Returns: Boolean.

IsValidDateTime(provider)

Verifies that an entire character string represents a valid date/time value.

Parameter
Type
Description

Returns: Boolean.

IsValidDateTime(format, provider)

Verifies that an entire character string represents a valid date/time value.

Parameter
Type
Description

format

Returns: Boolean.

IsValidDecimal(precision, scale)

Verifies that an entire character string represents a valid decimal value.

Parameter
Type
Description

precision

The number of digits to display.

scale

The number of digits to the right of the decimal point.

Returns: Boolean. bOk

IsValidDecimal(precision, scale, provider)

Verifies that an entire character string represents a valid decimal value.

Parameter
Type
Description

precision

The number of digits to display.

scale

The number of digits to the right of the decimal point.

Returns: Boolean. bOk

IsValidDecimal(precision, scale, format, provider)

Verifies that an entire character string represents a valid decimal value.

Parameter
Type
Description

precision

The number of digits to display.

scale

The number of digits to the right of the decimal point.

format

Returns: Boolean. bOk

IsValidIdentifierName()

Returns TRUE if the string is a valid identifier.

Returns: Boolean.

IsValidInteger()

Verifies that an entire character string represents a valid integer value.

Returns: Boolean.

IsValidInteger(format)

Verifies that an entire character string represents a valid integer value.

Parameter
Type
Description

format

Returns: Boolean.

IsValidNumber()

Verifies that an entire character string represents a valid number value.

Returns: Boolean. bOk

IsValidNumber(provider)

Verifies that an entire character string represents a valid number value.

Parameter
Type
Description

Returns: Boolean.

IsValidNumber(format, provider)

Verifies that an entire character string represents a valid number value.

Parameter
Type
Description

format

Returns: Boolean.

Left(length)

Returns a substring of a specified length starting at position zero.

Parameter
Type
Description

length

Returns: SalString.

Left(length, target)

Parameter
Type
Description

length

Returns: SalNumber.

Lop(target)

Parameter
Type
Description

Returns: SalNumber.

Mid(pos, length)

Returns a substring, starting at a specified position and containing a specified number of characters.

Parameter
Type
Description

length

Returns: SalString.

Mid(pos, length, target)

Parameter
Type
Description

length

Returns: SalNumber.

Repeat(times)

Concatenates a string with itself a specified number of times.

Parameter
Type
Description

times

Returns: SalString.

Repeat(times, target)

Parameter
Type
Description

times

Returns: SalNumber.

Replace(startPos, length, replace)

Replaces characters in one string with characters from another string.

Parameter
Type
Description

startPos

length

replace

Returns: SalString.

Replace(startPos, length, replace, target)

Parameter
Type
Description

startPos

length

replace

Returns: SalNumber.

Right(length)

Returns a string of specified length, starting with the last character in the string.

Parameter
Type
Description

length

Returns: SalString.

Right(length, target)

Parameter
Type
Description

length

Returns: SalNumber.

Scan(pattern)

Searches for and returns the offset of a specified substring. Uses wild card chars: % and _

Parameter
Type
Description

pattern

Returns: SalNumber.

SetBufferLength(length)

Sets the buffer string length to the length.

Parameter
Type
Description

length

Returns: SalString.

SetBufferLength(target, length)

Parameter
Type
Description

length

Returns: Boolean.

ToDate()

Converts a string to a date/time value.

Returns: SalDateTime.

ToDate(format)

Converts a string to a date/time value.

Parameter
Type
Description

format

Returns: SalDateTime.

ToDate(format, provider)

Converts a string to a date/time value.

Parameter
Type
Description

format

Returns: SalDateTime.

ToHandle()

Converts a string to a number (handle) so it can be passed in a message using SalHStringTonumber. The handle is created using a GCHandle reference to this string. Therefore once the strong reference is created, this string will never be garbage collected until the application exits.

Returns: IntPtr.

ToHex()

Encodes the string buffer to a hexadecimal string.

Returns: String.

Tokenize(startDel, endDel)

Parses a string into substrings (tokens) based on specified start and end delimiters.

Parameter
Type
Description

startDel

endDel

Returns: SalArray<SalString>.

Tokenize(startDel, endDel, target)

Parses a string into substrings (tokens) based on specified start and end delimiters.

Parameter
Type
Description

Returns: SalNumber.

ToLower()

Converts a string to lowercase.

Returns: SalString.

ToLower(target)

Parameter
Type
Description

Returns: SalNumber.

ToNumber()

Converts a string to a number.

Returns: SalNumber.

ToNumber(format)

Converts a string to a number.

Parameter
Type
Description

format

Returns: SalNumber.

ToNumber(format, provider)

Converts a string to a number.

Parameter
Type
Description

format

Returns: SalNumber.

ToProper()

Converts a string to a proper name. In a proper name, the first letter of each word is uppercase; the remaining letters are lowercase.

Returns: SalString.

ToProper(target)

Parameter
Type
Description

Returns: SalNumber.

ToUpper()

Converts a string to uppercase.

Returns: SalString.

ToUpper(target)

Parameter
Type
Description

Returns: SalNumber.

Trim()

Strips leading and trailing blanks and compresses multiple spaces and tabs within a string to single spaces.

Returns: SalString.

Trim(target)

Parameter
Type
Description

Returns: SalNumber.

Uncompress()

Decompresses the string.

Returns: SalString.

Uncompress(target)

Parameter
Type
Description

Returns: Boolean.

Inherited By

Name
Description

Special SalString extension to support SalContextCurrent().

Implements

Name
Description

Common base interface for Sal types.

Last updated