Class SwiftCharset
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
chcharCharacter to test.
Returns
- bool
Trueif 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
sstringThe string to test.
Returns
- bool
Trueif 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
chcharCharacter to test.
Returns
- bool
Trueif 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
sstringThe string to test.
Returns
- bool
Trueif 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
chcharCharacter to test.
Returns
- bool
Trueif 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
sstringThe string to test.
Returns
- bool
Trueif 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
chcharCharacter to test.
nCharsetSwiftCharsetsA SwiftCharsets value that selects the character set to check against.
Returns
- bool
Trueif the character belongs to the character set given by the nCharset parameter.
IsInCharset(string, SwiftCharsets)
public static bool IsInCharset(string s, SwiftCharsets nCharset)
Parameters
sstringnCharsetSwiftCharsets
Returns
IsNumeric(char)
Indicates whether the given character belongs to the SWIFT Numeric character set.
public static bool IsNumeric(char ch)
Parameters
chcharCharacter to test.
Returns
- bool
Trueif 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
sstringThe string to test.
Returns
- bool
Trueif 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
chcharCharacter to test.
Returns
- bool
Trueif 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
sstringThe string to test.