# 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.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SalString : IComparable, IConvertible, IFormattable, INullable, ISalType, IXmlSerializable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SalString
    Inherits IComparable
    Implements IConvertible, IFormattable, INullable, ISalType, IXmlSerializable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalString()

Constructs a new SalString object containing an empty string.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalString(x)

Constructs a new SalString object.

| Name  | Type                                                                | Description |
| ----- | ------------------------------------------------------------------- | ----------- |
| **x** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalString(chars)

Constructs a new SalString object.

| Name      | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **chars** | [Char\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.char) |             |

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalString(chars, index, length)

Constructs a new SalString object.

| Name       | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **chars**  | [Char\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.char) |             |
| **index**  | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalString(blob)

Constructs a new SalString object.

| Name     | Type                                                                | Description |
| -------- | ------------------------------------------------------------------- | ----------- |
| **blob** | [Byte\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.byte) |             |

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalString(blob, index, length)

Constructs a new SalString object.

| Name       | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **blob**   | [Byte\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.byte) |             |
| **index**  | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |

## Fields

| Name         | Type                                                        | Description          |
| ------------ | ----------------------------------------------------------- | -------------------- |
| **Empty**    | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) | empty value          |
| **Null**     | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) | null value           |
| **NullBlob** | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) | null value for blobs |

## Properties

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsBlob

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Blob flag.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsEmpty

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Checks if this SalString object contains a null value or is empty.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsNull

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Checks if this SalString object contains a null value.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Item(index)

[Char](https://docs.microsoft.com/en-us/dotnet/api/system.char): Character indexer

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Length

[SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md): Returns the string's length up to the terminator char.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Value

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns the inner string value

## Methods

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Clone()

Returns a copy of this string.

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/69uzLyEV3ANF4GK6pznb)Compare(x, y)

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

| Parameter | Type                                                        | Description |
| --------- | ----------------------------------------------------------- | ----------- |
| **x**     | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |
| **y**     | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CompareTo(obj)

Compare to an object

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **obj**   | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CompareTo(x)

Compare to a SalString

| Parameter | Type                                                        | Description |
| --------- | ----------------------------------------------------------- | ----------- |
| **x**     | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Compress()

Compresses the string.

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Compress(sRet)

| Parameter | Type                                                         | Description |
| --------- | ------------------------------------------------------------ | ----------- |
| **sRet**  | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/69uzLyEV3ANF4GK6pznb)Concat(x, y)

* operator for concatenating two SalString objects.

| Parameter | Type                                                        | Description |
| --------- | ----------------------------------------------------------- | ----------- |
| **x**     | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |
| **y**     | [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/69uzLyEV3ANF4GK6pznb)FirstChar(target, charCode)

| Parameter    | Type                                                         | Description |
| ------------ | ------------------------------------------------------------ | ----------- |
| **target**   | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |
| **charCode** | [SalNumber&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/69uzLyEV3ANF4GK6pznb)FreeHandle(handle)

Frees a string handle created using SalHStringTonumber.

| Parameter  | Type                                                                | Description               |
| ---------- | ------------------------------------------------------------------- | ------------------------- |
| **handle** | [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) | String handle to release. |

### ![](/files/69uzLyEV3ANF4GK6pznb)FromHandle(handle, free)

Converts a number (string handle) to a string.

| Parameter  | Type                                                                  | Description                                                         |
| ---------- | --------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **handle** | [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)   | The handle to convert back to a string.                             |
| **free**   | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) | Indicates that the handle should be released. The default is false. |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/69uzLyEV3ANF4GK6pznb)FromHandleOnce(handle)

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

| Parameter  | Type                                                                | Description                             |
| ---------- | ------------------------------------------------------------------- | --------------------------------------- |
| **handle** | [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) | The handle to convert back to a string. |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/69uzLyEV3ANF4GK6pznb)FromHex(hex)

Decodes a hexadecimal string into a string.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **hex**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetBlob()

Returns the string content as an array of bytes.

**Returns:** [Byte\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.byte).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetBufferLength()

Returns the current buffer length of the string.

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md). nLength

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidCurrency(precision, scale)

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

| Parameter     | Type                                                              | Description |
| ------------- | ----------------------------------------------------------------- | ----------- |
| **precision** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **scale**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidCurrency(precision, scale, provider)

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

| Parameter     | Type                                                                                  | Description |
| ------------- | ------------------------------------------------------------------------------------- | ----------- |
| **precision** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     |             |
| **scale**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     |             |
| **provider**  | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidCurrency(precision, scale, format, provider)

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

| Parameter     | Type                                                                                  | Description |
| ------------- | ------------------------------------------------------------------------------------- | ----------- |
| **precision** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     |             |
| **scale**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     |             |
| **format**    | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                   |             |
| **provider**  | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidDateTime()

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

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidDateTime(provider)

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

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **provider** | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidDateTime(format, provider)

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

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **format**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                   |             |
| **provider** | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidDecimal(precision, scale)

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

| Parameter     | Type                                                              | Description                                             |
| ------------- | ----------------------------------------------------------------- | ------------------------------------------------------- |
| **precision** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The number of digits to display.                        |
| **scale**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The number of digits to the right of the decimal point. |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). bOk

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidDecimal(precision, scale, provider)

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

| Parameter     | Type                                                                                  | Description                                             |
| ------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| **precision** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     | The number of digits to display.                        |
| **scale**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     | The number of digits to the right of the decimal point. |
| **provider**  | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |                                                         |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). bOk

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidDecimal(precision, scale, format, provider)

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

| Parameter     | Type                                                                                  | Description                                             |
| ------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| **precision** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     | The number of digits to display.                        |
| **scale**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     | The number of digits to the right of the decimal point. |
| **format**    | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                   |                                                         |
| **provider**  | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |                                                         |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). bOk

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidIdentifierName()

Returns TRUE if the string is a valid identifier.

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidInteger()

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

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidInteger(format)

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

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidNumber()

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

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). bOk

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidNumber(provider)

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

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **provider** | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)IsValidNumber(format, provider)

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

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **format**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                   |             |
| **provider** | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Left(length)

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

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Left(length, target)

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md)      |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Lop(target)

| Parameter  | Type                                                         | Description |
| ---------- | ------------------------------------------------------------ | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Mid(pos, length)

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

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **pos**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Mid(pos, length, target)

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **pos**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md)      |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Repeat(times)

Concatenates a string with itself a specified number of times.

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **times** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Repeat(times, target)

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **times**  | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md)      |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Replace(startPos, length, replace)

Replaces characters in one string with characters from another string.

| Parameter    | Type                                                                | Description |
| ------------ | ------------------------------------------------------------------- | ----------- |
| **startPos** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |
| **length**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |
| **replace**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Replace(startPos, length, replace, target)

| Parameter    | Type                                                                | Description |
| ------------ | ------------------------------------------------------------------- | ----------- |
| **startPos** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |
| **length**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |
| **replace**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |
| **target**   | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md)        |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Right(length)

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

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Right(length, target)

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md)      |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Scan(pattern)

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

| Parameter   | Type                                                                | Description |
| ----------- | ------------------------------------------------------------------- | ----------- |
| **pattern** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetBufferLength(length)

Sets the buffer string length to the length.

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetBufferLength(target, length)

| Parameter  | Type                                                              | Description |
| ---------- | ----------------------------------------------------------------- | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md)      |             |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToDate()

Converts a string to a date/time value.

**Returns:** [SalDateTime](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToDate(format)

Converts a string to a date/time value.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [SalDateTime](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToDate(format, provider)

Converts a string to a date/time value.

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **format**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                   |             |
| **provider** | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [SalDateTime](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)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](https://docs.microsoft.com/en-us/dotnet/api/system.intptr).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToHex()

Encodes the string buffer to a hexadecimal string.

**Returns:** [String](https://docs.microsoft.com/en-us/dotnet/api/system.string).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Tokenize(startDel, endDel)

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

| Parameter    | Type                                                                | Description |
| ------------ | ------------------------------------------------------------------- | ----------- |
| **startDel** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |
| **endDel**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [SalArray\<SalString>](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Tokenize(startDel, endDel, target)

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

| Parameter    | Type                                                                   | Description |
| ------------ | ---------------------------------------------------------------------- | ----------- |
| **startDel** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)    |             |
| **endDel**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)    |             |
| **target**   | [SalArray\<SalString>](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToLower()

Converts a string to lowercase.

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToLower(target)

| Parameter  | Type                                                         | Description |
| ---------- | ------------------------------------------------------------ | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToNumber()

Converts a string to a number.

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToNumber(format)

Converts a string to a number.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToNumber(format, provider)

Converts a string to a number.

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **format**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                   |             |
| **provider** | [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)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](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToProper(target)

| Parameter  | Type                                                         | Description |
| ---------- | ------------------------------------------------------------ | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToUpper()

Converts a string to uppercase.

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ToUpper(target)

| Parameter  | Type                                                         | Description |
| ---------- | ------------------------------------------------------------ | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Trim()

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

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Trim(target)

| Parameter  | Type                                                         | Description |
| ---------- | ------------------------------------------------------------ | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Uncompress()

Decompresses the string.

**Returns:** [SalString](/ppj.runtime.49/types/ppj.runtime.salstring.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Uncompress(target)

| Parameter  | Type                                                         | Description |
| ---------- | ------------------------------------------------------------ | ----------- |
| **target** | [SalString&](/ppj.runtime.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

## Inherited By

| Name                                                               | Description                                                 |
| ------------------------------------------------------------------ | ----------------------------------------------------------- |
| [SalStringContext](/ppj.runtime.49/types/ppj.runtime.salstring.md) | Special SalString extension to support SalContextCurrent(). |

## Implements

| Name                                                       | Description                          |
| ---------------------------------------------------------- | ------------------------------------ |
| [ISalType](/ppj.runtime.49/types/ppj.runtime.salstring.md) | Common base interface for Sal types. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salstring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
