cppstl

Search:
Group by:

Nim wrapper for C++ STL :

  • std::vector mapped to CppVector
  • std::basic_string mapped to CppBasicString
  • std::string mapped to CppString (alias for CppBasicString[cchar])
  • std::complex mapped to CppComplex
  • std::shared_ptr mapped to CppSharedPtr
  • std::unique_ptr mapped to CppUniquePtr
  • std::pair mapped to CppPair

Example:

import cppstl
import cppstl
var stdstr = initCppString("AZERTY")
assert stdstr == "AZERTY"
stdstr.append("UIOP")
assert stdstr == "AZERTYUIOP"
let startportion = stdstr.find("AZ")
if startportion != std_npos:
  let endportion = startportion + len("AZ")
  stdstr.replace(startportion, endportion, "QW")
  assert stdstr == "QWERTYUIOP"

Example:

import cppstl
import cppstl
import complex
var z = initCppComplex[float32](41.0, 31.0)
var conj_z = z.conj()
assert conj_z.real == z.real
assert conj_z.imag == -z.imag

Exports

pushBack, last, crEnd, toCppVector, CppIterator, swap, ==, >=, initCppVector, initCppVector, +, erase, maxSize, reserve, at, assign, assign, insert, inc, popBack, rBegin, assign, size, -, rEnd, front, [], begin, initCppVector, last, constIterator, resize, crBegin, toSeq, CppVectorIteratorToCppVectorConstIterator, items, pairs, >, CppConstIterator, clear, CppVectorConstIterator, []=, ==, initCppVector, first, iterator, <, cBegin, back, <=, front, data, initCppVector, end, [], empty, ==, $, len, OutOfRangeException, CppVector, insert, capacity, CppVectorIterator, erase, add, at, insert, !=, inc, back, cEnd, shrinkToFit, first, [], [], findLastOf, findLastOf, >, first, findLastOf, <, <=, add, substr, items, >=, ==, erase, erase, compare, replace, maxSize, last, initCppBasicString, ==, [], findLastOf, assign, findLastNotOf, replace, mpairs, popBack, +=, front, -, <=, front, insert, compare, find, findLastOf, first, >=, resize, stdNpos, insert, find, findFirstOf, find, [], clear, back, copy, >, findFirstNotOf, initCppBasicString, compare, findLastNotOf, data, ==, rfind, replace, CppConstIterator, initCppBasicString, !=, erase, mitems, OutOfRangeException, +, insert, capacity, erase, !=, ==, replace, compare, back, cEnd, findFirstNotOf, shrinkToFit, !=, +, +, replace, replace, pushBack, last, crEnd, >, CppBasicStringIteratorToBasicStringConstIterator, CppIterator, swap, append, compare, CppBasicStringIterator, CppBasicStringConstIterator, initCppBasicString, [], rfind, reserve, <=, at, replace, findLastNotOf, assign, insert, inc, >=, rBegin, find, size, append, rEnd, CppBasicString, replace, initCppBasicString, begin, ==, findFirstNotOf, findFirstNotOf, rfind, <, append, +, crBegin, replace, +=, append, assign, findFirstNotOf, pairs, length, findFirstOf, empty, []=, findLastNotOf, findFirstOf, append, <, cBegin, compare, initCppBasicString, assign, assign, end, insert, findFirstOf, [], compare, rfind, len, find, +, replace, assign, at, insert, findLastNotOf, initCppBasicString, +, +=, inc, cStr, findFirstOf, rfind, insert, append, insert, last, <, <=, substr, findLastOf, ==, at, erase, findFirstOf, erase, !=, replace, maxSize, find, >=, ==, cStr, length, replace, mpairs, <, +=, rfind, -, <=, front, insert, !=, find, initCppString, findLastOf, insert, findFirstOf, find, !=, back, copy, +=, findFirstNotOf, <=, data, ==, !=, erase, mitems, add, +, findFirstOf, insert, capacity, erase, findLastNotOf, ==, replace, !=, back, findFirstNotOf, shrinkToFit, find, +, replace, replace, <=, <=, find, >=, >=, CppIterator, findLastNotOf, ==, CppBasicStringIterator, CppBasicStringConstIterator, initCppBasicString, >, reserve, compare, CppStrConstIterator, assign, [], >=, size, initCppBasicString, findLastNotOf, replace, initCppBasicString, rfind, findFirstNotOf, <, append, crBegin, replace, +=, +=, assign, pairs, rfind, findFirstOf, replace, empty, []=, first, <, cBegin, findLastNotOf, initCppBasicString, front, CppStrIterator, assign, insert, findFirstOf, ==, toString, $, first, +, replace, CppString, rfind, [], initCppBasicString, append, append, findFirstOf, >, initCppString, [], append, [], findLastOf, findLastOf, findLastOf, compare, findFirstNotOf, initCppString, >=, replace, compare, insert, findLastOf, >, !=, popBack, assign, append, compare, >, compare, +, initCppString, last, resize, stdNpos, cStr, find, initCppString, toCppString, >=, initCppBasicString, compare, findLastNotOf, clear, replace, replace, CppConstIterator, initCppBasicString, rfind, findFirstNotOf, ==, append, compare, initCppString, cEnd, +, pushBack, crEnd, <, swap, append, compare, insert, assign, CppBasicStringIteratorToBasicStringConstIterator, <=, findLastOf, replace, rfind, insert, inc, rBegin, find, findLastNotOf, append, rEnd, CppBasicString, begin, ==, findFirstNotOf, <, +, rfind, findFirstNotOf, assign, CppStrIteratorToStrConstIterator, findFirstOf, inc, compare, items, replace, compare, >, >, end, compare, assign, len, initCppString, +, OutOfRangeException, at, insert, findLastNotOf, +, initCppString, assign, insert, insert, CppUniquePtr, makeUnique, =copy, =sink, makeShared, newCppSharedPtr, $, =sink, .=, CppSharedPtr, =copy, makeShared, .(), ., $, get, deref, conj, /, abs, !=, +=, $, CppComplex, -, norm, imag, *=, toCppComplex, initCppComplex, real, -=, ==, /=, arg, +, *, toComplex, polar, initCppPair, first, initCppPair, swap, <, >=, ==, <=, >, second=, toTuple, get, makePair, $, initCppPair, makePair, first, second, get, !=, CppPair, second, first=