Table of Contents

Class StringUtil

Namespace
DxFeed.Graal.Net.Utils
Assembly
DxFeed.Graal.Net.dll

Provides utility methods for working with strings.

public static class StringUtil
Inheritance
StringUtil
Inherited Members

Methods

CheckChar(char, int, string)

Checks that the specified char fits within the specified bit mask.

public static void CheckChar(char c, int mask, string name)

Parameters

c char

The specified char.

mask int

The specified bit mask.

name string

The char name used in the exception message.

Exceptions

ArgumentException

If the specified char does not fit within the mask.

EncodeChar(char)

Encodes the specified char to a string. If the value of the char falls within the range of printable ASCII characters [32-126], returns a string containing that character; otherwise, returns the Unicode escape sequence ("(\uxxxx)"). For a null char, returns "\0".

public static string EncodeChar(char c)

Parameters

c char

The specified char.

Returns

string

Returns the encoded string.

EncodeNullableString(string?)

Encodes the specified nullable string. If the string is null, returns the string "null"; otherwise, returns the specified string.

public static string EncodeNullableString(string? s)

Parameters

s string

The specified string.

Returns

string

The specified string or the string "null".