MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / pluralFormatNicely

Function pluralFormatNicely

code/main/Algo.ts:71–75  ·  view source on GitHub ↗
(n: number, singular: string, plural: string)

Source from the content-addressed store, hash-verified

69
70 // Create a string from a number and a word added depending on the plurality of the number (and format the number nicely)
71 export function pluralFormatNicely(n: number, singular: string, plural: string): string{
72 if(n == 1)
73 return numberToStringButNicely(n) + singular;
74 return numberToStringButNicely(n) + plural;
75 }
76
77 // Remove all special characters from a string, only let lower-case letters
78 export function simplifyString(s: string): string{

Callers

nothing calls this directly

Calls 1

numberToStringButNicelyFunction · 0.85

Tested by

no test coverage detected