SalString

PPJ.Runtime.SalString

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.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

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

SalString(chars, index, length)

Constructs a new SalString object.

SalString(blob)

Constructs a new SalString object.

Name
Type
Description

SalString(blob, index, length)

Constructs a new SalString object.

Fields

Name
Type
Description

Empty

empty value

Null

null value

NullBlob

null value for blobs

Properties

IsBlob

Booleanarrow-up-right: Blob flag.

IsEmpty

Booleanarrow-up-right: Checks if this SalString object contains a null value or is empty.

IsNull

Booleanarrow-up-right: Checks if this SalString object contains a null value.

Item(index)

Chararrow-up-right: Character indexer

Length

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

Value

Stringarrow-up-right: 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: Int32arrow-up-right.

CompareTo(obj)

Compare to an object

Parameter
Type
Description

Returns: Int32arrow-up-right.

CompareTo(x)

Compare to a SalString

Parameter
Type
Description

Returns: Int32arrow-up-right.

Compress()

Compresses the string.

Returns: SalString.

Compress(sRet)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

Concat(x, y)

  • operator for concatenating two SalString objects.

Parameter
Type
Description

Returns: SalString.

FirstChar(target, charCode)

Parameter
Type
Description

charCode

Returns: Booleanarrow-up-right.

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[]arrow-up-right.

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

Returns: Booleanarrow-up-right.

IsValidCurrency(precision, scale, provider)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValidCurrency(precision, scale, format, provider)

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

Returns: Booleanarrow-up-right.

IsValidDateTime()

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

Returns: Booleanarrow-up-right.

IsValidDateTime(provider)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValidDateTime(format, provider)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

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: Booleanarrow-up-right. 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: Booleanarrow-up-right. 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.

Returns: Booleanarrow-up-right. bOk

IsValidIdentifierName()

Returns TRUE if the string is a valid identifier.

Returns: Booleanarrow-up-right.

IsValidInteger()

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

Returns: Booleanarrow-up-right.

IsValidInteger(format)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValidNumber()

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

Returns: Booleanarrow-up-right. bOk

IsValidNumber(provider)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

IsValidNumber(format, provider)

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

Parameter
Type
Description

Returns: Booleanarrow-up-right.

Left(length)

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

Parameter
Type
Description

Returns: SalString.

Left(length, target)

Parameter
Type
Description

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

Returns: SalString.

Mid(pos, length, target)

Parameter
Type
Description

Returns: SalNumber.

Repeat(times)

Concatenates a string with itself a specified number of times.

Parameter
Type
Description

Returns: SalString.

Repeat(times, target)

Parameter
Type
Description

Returns: SalNumber.

Replace(startPos, length, replace)

Replaces characters in one string with characters from another string.

Parameter
Type
Description

Returns: SalString.

Replace(startPos, length, replace, target)

Parameter
Type
Description

Returns: SalNumber.

Right(length)

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

Parameter
Type
Description

Returns: SalString.

Right(length, target)

Parameter
Type
Description

Returns: SalNumber.

Scan(pattern)

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

Parameter
Type
Description

Returns: SalNumber.

SetBufferLength(length)

Sets the buffer string length to the length.

Parameter
Type
Description

Returns: SalString.

SetBufferLength(target, length)

Parameter
Type
Description

Returns: Booleanarrow-up-right.

ToDate()

Converts a string to a date/time value.

Returns: SalDateTime.

ToDate(format)

Converts a string to a date/time value.

Parameter
Type
Description

Returns: SalDateTime.

ToDate(format, provider)

Converts a string to a date/time value.

Parameter
Type
Description

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: IntPtrarrow-up-right.

ToHex()

Encodes the string buffer to a hexadecimal string.

Returns: Stringarrow-up-right.

Tokenize(startDel, endDel)

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

Parameter
Type
Description

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

Returns: SalNumber.

ToNumber(format, provider)

Converts a string to a number.

Parameter
Type
Description

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: Booleanarrow-up-right.

Inherited By

Name
Description

Special SalString extension to support SalContextCurrent().

Implements

Name
Description

Common base interface for Sal types.

Last updated