MCPcopy
hub / github.com/cortexlabs/cortex / PluralCustom

Function PluralCustom

pkg/lib/strings/operations.go:227–233  ·  view source on GitHub ↗
(singular string, plural string, count interface{})

Source from the content-addressed store, hash-verified

225}
226
227func PluralCustom(singular string, plural string, count interface{}) string {
228 countInt, _ := cast.InterfaceToInt64(count)
229 if countInt == 1 {
230 return singular
231 }
232 return plural
233}
234
235// RemoveDuplicates returns a filtered string slice without repeated entries.
236// The ignoreRegex parameter can optionally be used to ignore repeated patterns in each slice entry.

Callers 3

PluralSFunction · 0.85
PluralEsFunction · 0.85
PluralIsFunction · 0.85

Calls 1

InterfaceToInt64Function · 0.92

Tested by

no test coverage detected