MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / SubString

Method SubString

src/UTF8StringSlice.hpp:97–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 UTF8StringSliceBase SubString(const LengthType offset,
98 const LengthType numberOfCharacters) const {
99 if (offset == 0) {
100 return Left(numberOfCharacters);
101 } else {
102 const char* pstr = str;
103 for (size_t i = 0; i < offset; i++) {
104 pstr = UTF8Util::NextChar(pstr);
105 }
106 return UTF8StringSliceBase(pstr, numberOfCharacters);
107 }
108 }
109
110 std::string ToString() const { return std::string(str, str + byteLength); }
111

Callers 2

TEST_FFunction · 0.80

Calls 2

NextCharFunction · 0.85
UTF8StringSliceBaseClass · 0.85

Tested by 1

TEST_FFunction · 0.64