margrave/common

Source   Edit  

Types

NativeString = string
Most convenient string type to use for each backend. cstring on JS. Source   Edit  

Consts

margraveCurlyNoHtmlEscape {.booldefine.} = false
The default compile time value of MargraveOptions.curlyNoHtmlEscape. Source   Edit  
margraveDelimedUseSubstrs {.booldefine.} = false
Possible minor optimization. Not guaranteed to be faster. Source   Edit  
margraveNoDefaultHtmlHandler {.booldefine.} = false
Define this to disable inline HTML at compile time completely, to circumvent the standard library XML parser dependency. This is overriden by MargraveParser.inlineHtmlHandler. Source   Edit  
margraveSingleLineStaticBool {.booldefine.} = false
Possible minor optimization. Not guaranteed to be faster. Source   Edit  

Procs

func contains[I](arr: static array[I, string]; x: string): bool {.inline.}
More efficient version of contains for static arrays of strings using case Source   Edit  
func toCstring[T: enum](x: T): cstring
Source   Edit  

Templates

template moveCompat(x: untyped): untyped
Compatibility replacement for move Source   Edit  
template toNativeString(x: char): NativeString
Source   Edit  
template toNativeString(x: cstring): NativeString
Source   Edit  
template toNativeString(x: string): NativeString
Source   Edit