C# Class Supermarket.NameGenerator

Static class that generates names from random syllables.
Afficher le fichier Open project: Clarksj4/Theme-Supermarket-Tycoon-World

Méthodes publiques

Méthode Description
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.

Method Details

CapitalizeFirst() public static méthode

Capitalizes the first letter of the given string
public static CapitalizeFirst ( string name ) : string
name string THe string to capitalize the first letter of
Résultat string

FirstAndLastName() public static méthode

Generates a name from random syllables. The name includes both a first and last name.
public static FirstAndLastName ( ) : string
Résultat string

GenerateName() public static méthode

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
Résultat string

LoadSyllables() public static méthode

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
Résultat string[]