Table of Contents

Class NATOPhoneticAlphabetHelper

Namespace
Uncreated.Warfare.Util
Assembly
Uncreated.Warfare.dll

Helper for parsing and getting NATO code words for the latin alphabet.

public static class NATOPhoneticAlphabetHelper
Inheritance
NATOPhoneticAlphabetHelper
Inherited Members

Methods

GetLowerCase(char)

Get the word for the phonetic alphabet character in lower-case. Example: 'bravo'.

public static string GetLowerCase(char character)

Parameters

character char

Any character in the ranges 'a'-'z', 'A'-'Z', or '0'-'9'.

Returns

string

Exceptions

ArgumentOutOfRangeException

GetProperCase(char)

Get the word for the phonetic alphabet character in proper-case. Example: 'Bravo'.

public static string GetProperCase(char character)

Parameters

character char

Any character in the ranges 'a'-'z', 'A'-'Z', or '0'-'9'.

Returns

string

Exceptions

ArgumentOutOfRangeException

GetUpperCase(char)

Get the word for the phonetic alphabet character in upper-case. Example: 'BRAVO'.

public static string GetUpperCase(char character)

Parameters

character char

Any character in the ranges 'a'-'z', 'A'-'Z', or '0'-'9'.

Returns

string

Exceptions

ArgumentOutOfRangeException

Parse(ReadOnlySpan<char>)

Attempts to identify the code word in word and output the character associated with it.

public static char Parse(ReadOnlySpan<char> word)

Parameters

word ReadOnlySpan<char>

Returns

char

A character in the ranges 'a'-'z', 'A'-'Z', or '0'-'9'.

Exceptions

FormatException

Failed to identify a code word.

TryParse(ReadOnlySpan<char>, out char)

Attempts to identify the code word in word and output the character associated with it.

public static bool TryParse(ReadOnlySpan<char> word, out char alphabetCharacter)

Parameters

word ReadOnlySpan<char>
alphabetCharacter char

A character in the ranges 'a'-'z', 'A'-'Z', or '0'-'9', or NUL if parse failed.

Returns

bool

true if a code word was parsed, otherwise false.