MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / rsplitAny

Method rsplitAny

source/core/StarString.cpp:350–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350StringList String::rsplitAny(String const& chars, size_t maxSplit) const {
351 // This is really inefficient!
352 String v = reverse();
353 StringList l = v.splitAny(chars, maxSplit);
354 for (auto& s : l)
355 s = s.reverse();
356
357 Star::reverse(l);
358 return l;
359}
360
361StringList String::splitLines(size_t maxSplit) const {
362 return splitAny("\r\n", maxSplit);

Callers 1

TESTFunction · 0.80

Calls 3

splitAnyMethod · 0.80
reverseFunction · 0.70
reverseMethod · 0.45

Tested by 1

TESTFunction · 0.64