MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / SubStringFrom

Method SubStringFrom

src/Nazara/Core/String.cpp:3895–3912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3893 */
3894
3895 String String::SubStringFrom(char character, std::intmax_t startPos, bool fromLast, bool include, UInt32 flags) const
3896 {
3897 if (character == '\0')
3898 return *this;
3899
3900 std::size_t pos;
3901 if (fromLast)
3902 pos = FindLast(character, startPos, flags);
3903 else
3904 pos = Find(character, startPos, flags);
3905
3906 if (pos == 0 && include)
3907 return *this;
3908 else if (pos == npos)
3909 return String();
3910
3911 return SubString(pos + ((include) ? 0 : 1));
3912 }
3913
3914 /*!
3915 * \brief Returns a sub string of the string from a string

Callers 5

LoadFunction · 0.80
SaveToStreamFunction · 0.80
GetFileNameMethod · 0.80
String.cppFile · 0.80
mainFunction · 0.80

Calls 2

GetConstBufferMethod · 0.80
StringClass · 0.50

Tested by

no test coverage detected