Procs
func enumNamesTable(En: typedesc; withDirectName: bool = true; withDroppedPrefix: bool = true): seq[ tuple[names: seq[string], value: En:type]]
- Source Edit
func enumNamesTable[En: enum](arg: En; withDirectName: bool = true; withDroppedPrefix: bool = true): seq[ tuple[names: seq[string], value: En]]
-
Return list of all enum names.
- NOTE :: for best performance assign results to const as this function computes stringified value for each enum.
func namedSubnode[T: enum](kind: T; idx: int; map: static[ seq[tuple[key: T, subnames: seq[string]]]]; fallback: string = "<<fail>>"): string
- Source Edit
Macros
macro directEnumName(arg: typed): untyped
- #DOC Source Edit
Exports
-
joinw, dropCommonPrefix, escapeStrLit, snakeToCamelCase, StringAlignDirection, addSuffix, wrap, addIndent, interpolatedExprs, toStrPart, filterPrefix, ^, toUpperAscii, getIndent, [], findEnd, toSnakeCase, joinCamel, startsWith, StrPart, abbrevCamel, [], addPrefix, wrap, [], wrap, dropPrefix, dropSuffix, getKeys, StrPartTuple, commonPrefix, indentBody, splitTokenize, |>>, |>>, delete, toStrPart, posString, endsWith, StrPartKind, len, makeCommentSection, |<>, toDashedCase, startsWith, addPrefix, dropPrefix, toStrPart, fmt3, splitSnake, toSnakeCamelCase, splitTokenize, ^, mismatchStart, keepNimIdentChars, fmtJoin, lit3, join, splitCamel, abbrevCamel, StrBackIndex, contains, joinkv, [], |<<, |<<, dashedWords, joinq, delete, msgjoinImpl, CharBackIndex, toStrPart, abbrevSnake, joinl, enclosedIn, enclosedIn, InterpolatedExprKind, startsWith, joinLiteral, escapeHTML, dropNormPrefix, items, msgjoin, fixCapitalizeAscii, startsWith, endsWith, toStrPartTuple, join, dropPrefix, replaceN, wrap, StrPartConv, skip1, enclosedIn, join, addPrefix, IdentStyle, getRandomBase64, joinql, [], []