cppstl/std_string

Search:
Group by:

This module contains types and procs specific to std::string (i.e. std::basic_string<char>), including constructors and overloads that take Nim string/cstring.

Procs

proc `!=`(a: CppString; b: CppString): bool {.importcpp: "(# != #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `!=`(a: CppString; b: string | cstring): bool {.inline.}
proc `!=`(a: string | cstring; b: CppString): bool {.inline.}
proc `$`(s: CppString): string {.noinit, ...raises: [], tags: [], forbids: [].}
proc `+`(a: CppString; b: string | cstring): CppString {.inline.}
proc `+`(a: string | cstring; b: CppString): CppString {.inline.}
proc `+=`(self: var CppString; str: cstring) {.importcpp: "(# += #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `<`(a: CppString; b: CppString): bool {.importcpp: "(# < #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `<`(a: CppString; b: string | cstring): bool {.inline.}
proc `<`(a: string | cstring; b: CppString): bool {.inline.}
proc `<=`(a: CppString; b: CppString): bool {.importcpp: "(# <= #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `<=`(a: CppString; b: string | cstring): bool {.inline.}
proc `<=`(a: string | cstring; b: CppString): bool {.inline.}
proc `==`(a: CppString; b: CppString): bool {.importcpp: "(# == #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `==`(a: CppString; b: string | cstring): bool {.inline.}
proc `==`(a: string | cstring; b: CppString): bool {.inline.}
proc `>`(a: CppString; b: CppString): bool {.importcpp: "(# > #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `>`(a: CppString; b: string | cstring): bool {.inline.}
proc `>`(a: string | cstring; b: CppString): bool {.inline.}
proc `>=`(a: CppString; b: CppString): bool {.importcpp: "(# >= #)",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc `>=`(a: CppString; b: string | cstring): bool {.inline.}
proc `>=`(a: string | cstring; b: CppString): bool {.inline.}
proc append(self: var CppString; str: cstring) {.importcpp: "append",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc append(self: var CppString; str: cstring; n: csize_t) {.
    importcpp: "append", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc assign(self: var CppString; str: cstring) {.importcpp: "assign",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc assign(self: var CppString; str: cstring; n: csize_t) {.
    importcpp: "assign", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc compare(self: CppString; pos, l: csize_t; str: cstring): cint {.
    importcpp: "compare", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc compare(self: CppString; pos, l: csize_t; str: cstring; n: csize_t): cint {.
    importcpp: "compare", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc compare(self: CppString; pos, l: csize_t; str: cstring;
             subpos, subl: csize_t): cint {.importcpp: "compare",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc compare(self: CppString; s: cstring): cint {.importcpp: "compare",
    header: "<string>", ...raises: [], tags: [], forbids: [].}
proc cStr(self: CppString): cstring {.importcpp: "const_cast<char*>(#.c_str())",
                                      header: "<string>", ...raises: [], tags: [],
                                      forbids: [].}
proc find(self: CppString; s: cstring; pos, n: csize_t): csize_t {.
    importcpp: "find", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc find(self: CppString; s: cstring; pos: csize_t = 0): csize_t {.
    importcpp: "find", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc findFirstNotOf(self: CppString; s: cstring; pos, n: csize_t): csize_t {.
    importcpp: "find_first_not_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findFirstNotOf(self: CppString; s: cstring; pos: csize_t = 0): csize_t {.
    importcpp: "find_first_not_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findFirstOf(self: CppString; s: cstring; pos, n: csize_t): csize_t {.
    importcpp: "find_first_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findFirstOf(self: CppString; s: cstring; pos: csize_t = 0): csize_t {.
    importcpp: "find_first_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findLastNotOf(self: CppString; s: cstring; pos, n: csize_t): csize_t {.
    importcpp: "find_last_not_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findLastNotOf(self: CppString; s: cstring; pos: csize_t = std_npos): csize_t {.
    importcpp: "find_last_not_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findLastOf(self: CppString; s: cstring; pos, n: csize_t): csize_t {.
    importcpp: "find_last_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc findLastOf(self: CppString; s: cstring; pos: csize_t = std_npos): csize_t {.
    importcpp: "find_last_of", header: "<string>", ...raises: [], tags: [],
    forbids: [].}
proc initCppString(): CppString {.constructor, importcpp: "std::string()",
                                  header: "<string>".}
proc initCppString(first, last: CppStrConstIterator): CppString {.constructor,
    importcpp: "std::string(@)", header: "<string>".}
proc initCppString(s: cstring): CppString {.constructor,
    importcpp: "std::string(@)", header: "<string>".}
proc initCppString(s: cstring; n: csize_t): CppString {.constructor,
    importcpp: "std::string(@)", header: "<string>".}
proc initCppString(s: string): CppString {.inline, ...raises: [Exception],
    tags: [RootEffect], forbids: [].}
proc initCppString(str: CppString): CppString {.constructor,
    importcpp: "std::string(@)", header: "<string>".}
proc initCppString(str: CppString; pos, len: csize_t): CppString {.constructor,
    importcpp: "std::string(@)", header: "<string>".}
proc initCppString(str: CppString; pos: csize_t): CppString {.constructor,
    importcpp: "std::string(@)", header: "<string>".}
proc insert(self: var CppString; pos: csize_t; s: cstring) {.
    importcpp: "insert", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc insert(self: var CppString; pos: csize_t; s: cstring; n: csize_t) {.
    importcpp: "insert", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc replace(self: var CppString; i1, i2: CppStrConstIterator; s: cstring) {.
    importcpp: "replace", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc replace(self: var CppString; i1, i2: CppStrConstIterator; s: cstring;
             n: csize_t) {.importcpp: "replace", header: "<string>", ...raises: [],
                           tags: [], forbids: [].}
proc replace(self: var CppString; pos, l: csize_t; s: cstring) {.
    importcpp: "replace", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc replace(self: var CppString; pos, l: csize_t; s: cstring; n: csize_t) {.
    importcpp: "replace", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc rfind(self: CppString; s: cstring; pos, n: csize_t): csize_t {.
    importcpp: "rfind", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc rfind(self: CppString; s: cstring; pos: csize_t = std_npos): csize_t {.
    importcpp: "rfind", header: "<string>", ...raises: [], tags: [], forbids: [].}
proc toCppString(s: string): CppString {.inline, ...raises: [Exception],
    tags: [RootEffect], forbids: [].}
proc toString(s: CppString): string {....raises: [], tags: [], forbids: [].}

Converters

converter CppStrIteratorToStrConstIterator(s: CppStrIterator): CppStrConstIterator {.
    importcpp: "#", header: "<string>", ...raises: [], tags: [], forbids: [].}