MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / Pos

Method Pos

Kernel-Bridge/API/StringsAPI.h:432–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430#endif
431
432 inline size_t Pos(const TChar* Substring, size_t Offset = 0, bool GetRelativePos = false) const {
433 const TChar* SubstrAddr = Find(Substring, Offset);
434 if (!SubstrAddr) return NoPos;
435 size_t AbsPos = (reinterpret_cast<size_t>(SubstrAddr) - reinterpret_cast<size_t>(Data.Buffer)) / sizeof(TChar);
436 return GetRelativePos ? AbsPos - Offset : AbsPos;
437 }
438
439 String& Delete(size_t Position, size_t Count, bool AutoShrink = false) {
440 if (Position >= Data.Length) return *this;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected