Class SwiftCharset

Namespace
Subsembly.Swift
Assembly
Subsembly.Sepa.dll

Collects utility methods about SWIFT character sets.

public static class SwiftCharset
Inheritance
SwiftCharset
Inherited Members

Methods

IsAlpha(char)

Indicates whether the given character belongs to the SWIFT Alpha character set.

public static bool IsAlpha(char ch)

Parameters

ch char

Character to test.

Returns

bool

True if the character is an upper case letter in the range from 'A' through 'Z'.

IsAlpha(string)

Tests whether the entire string contains only characters from the SWIFT Alpha character set.

public static bool IsAlpha(string s)

Parameters

s string

The string to test.

Returns

bool

True if all characters are upper case letters in the range from 'A' through 'Z'.

IsAlphaNumeric(char)

Indicates whether the given character belongs to the SWIFT AlphaNumeric character set.

public static bool IsAlphaNumeric(char ch)

Parameters

ch char

Character to test.

Returns

bool

True if the character is an upper case letter in the range from 'A' through 'Z' or a digit in the range from '0' through '9'.

IsAlphaNumeric(string)

Tests whether the entire string contains only characters from the SWIFT AlphaNumeric character set.

public static bool IsAlphaNumeric(string s)

Parameters

s string

The string to test.

Returns

bool

True if all characters are upper case letters in the range from 'A' through 'Z' or digits in the range from '0' through '9'.

IsDecimal(char)

Indicates whether the given character belongs to the SWIFT Decimal character set.

public static bool IsDecimal(char ch)

Parameters

ch char

Character to test.

Returns

bool

True if the character is a digit in the range from '0' through '9' or the comma ','.

IsDecimal(string)

Tests whether the entire string contains only characters from the SWIFT Decimal character set.

public static bool IsDecimal(string s)

Parameters

s string

The string to test.

Returns

bool

True if all characters are digits in the range from '0' through '9' and there was at most one comma ','.

IsInCharset(char, SwiftCharsets)

Test whether a character belongs to a particular character set.

public static bool IsInCharset(char ch, SwiftCharsets nCharset)

Parameters

ch char

Character to test.

nCharset SwiftCharsets

A SwiftCharsets value that selects the character set to check against.

Returns

bool

True if the character belongs to the character set given by the nCharset parameter.

IsInCharset(string, SwiftCharsets)

public static bool IsInCharset(string s, SwiftCharsets nCharset)

Parameters

s string
nCharset SwiftCharsets

Returns

bool

IsNumeric(char)

Indicates whether the given character belongs to the SWIFT Numeric character set.

public static bool IsNumeric(char ch)

Parameters

ch char

Character to test.

Returns

bool

True if the character is a digit in the range from '0' through '9'.

IsNumeric(string)

Tests whether the entire string contains only characters from the SWIFT Numeric character set.

public static bool IsNumeric(string s)

Parameters

s string

The string to test.

Returns

bool

True if all characters are digits in the range from '0' through '9'.

IsSwift(char)

Indicates whether the given character may appear in a SWIFT message at all.

public static bool IsSwift(char ch)

Parameters

ch char

Character to test.

Returns

bool

True if the character is a valid character for a SWIFT message, i.e. it belongs to the All character set.

IsSwift(string)

Tests whether the entire string contains only characters that may appear in a SWIFT message.

public static bool IsSwift(string s)

Parameters

s string

The string to test.

Returns

bool

True if all characters are valid characters for a SWIFT message, i.e. all belong to the All character set.