C# Класс Supermarket.NameGenerator

Static class that generates names from random syllables.
Показать файл Открыть проект

Открытые методы

Метод Описание
CapitalizeFirst ( string name ) : string

Capitalizes the first letter of the given string

FirstAndLastName ( ) : string

Generates a name from random syllables. The name includes both a first and last name.

GenerateName ( int minSyllables, int maxSyllables ) : string

Generates a name by concatenating n syllables where: minSyllables < n < maxSyllables

LoadSyllables ( string path ) : string[]

Loads list of syllables from the file at the given path.

Описание методов

CapitalizeFirst() публичный статический Метод

Capitalizes the first letter of the given string
public static CapitalizeFirst ( string name ) : string
name string THe string to capitalize the first letter of
Результат string

FirstAndLastName() публичный статический Метод

Generates a name from random syllables. The name includes both a first and last name.
public static FirstAndLastName ( ) : string
Результат string

GenerateName() публичный статический Метод

Generates a name by concatenating n syllables where: minSyllables < n < maxSyllables
public static GenerateName ( int minSyllables, int maxSyllables ) : string
minSyllables int The minimum number of syllables to include in the name
maxSyllables int The maximum number of syllables to include in the name
Результат string

LoadSyllables() публичный статический Метод

Loads list of syllables from the file at the given path.
public static LoadSyllables ( string path ) : string[]
path string The path to the file that contains the syllables
Результат string[]