src/odbcn/widestrx

  Source   Edit

Ripped code from system/widestrs made more flexible with primitive types. This makes conversion between UTF-8 and UTF-16 much easier, possible to do at compile-time, and involve less allocations. These are possible to use at compile-time, as opposed to system/widestrs.newWideCString, which uses raw allocation. Raw allocations are not permitted in nimvm.

Procs

proc utf8To16(s: openArray[char]): seq[Utf16Char] {....raises: [], tags: [].}
  Source   Edit
proc utf16To8(w: openArray[Utf16Char]): string {....raises: [], tags: [].}
  Source   Edit

Iterators

iterator runes(s: openArray[char]): int {....raises: [], tags: [].}
Iterates over any rune of the string s returning runes.   Source   Edit