MCPcopy Create free account
hub / github.com/anjo76/angelscript / StringSubString

Function StringSubString

sdk/add_on/scriptstdstring/scriptstdstring.cpp:958–966  ·  view source on GitHub ↗

This function returns a string containing the substring of the input string determined by the starting index and count of characters. AngelScript signature: string string::substr(uint start = 0, int count = -1) const

Source from the content-addressed store, hash-verified

956// AngelScript signature:
957// string string::substr(uint start = 0, int count = -1) const
958static string StringSubString(asUINT start, int count, const string &str)
959{
960 // Check for out-of-bounds
961 string ret;
962 if( start < str.length() && count != 0 )
963 ret = str.substr(start, (size_t)(count < 0 ? string::npos : count));
964
965 return ret;
966}
967
968// String equality comparison.
969// Returns true iff lhs is equal to rhs.

Callers 1

StringSubString_GenericFunction · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected