mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -236,4 +236,9 @@ namespace bx
|
||||
}
|
||||
}
|
||||
|
||||
inline StringView strSubstr(const StringView& _str, int32_t _start, int32_t _len)
|
||||
{
|
||||
return StringView(_str, _start, _len);
|
||||
}
|
||||
|
||||
} // namespace bx
|
||||
|
||||
@@ -245,12 +245,12 @@ namespace bx
|
||||
/// Find end of line. Retuns pointer to new line terminator.
|
||||
StringView strFindEol(const StringView& _str);
|
||||
|
||||
/// Returns pointer to first character after word.
|
||||
const char* strSkipWord(const char* _str, int32_t _max = INT32_MAX);
|
||||
|
||||
/// Returns StringView of word or empty.
|
||||
StringView strWord(const StringView& _str);
|
||||
|
||||
///
|
||||
StringView strSubstr(const StringView& _str, int32_t _start, int32_t _len);
|
||||
|
||||
/// Find matching block.
|
||||
const char* strmb(const char* _str, char _open, char _close);
|
||||
|
||||
|
||||
@@ -593,7 +593,7 @@ namespace bx
|
||||
return StringView(_str.getTerm(), _str.getTerm() );
|
||||
}
|
||||
|
||||
const char* strSkipWord(const char* _str, int32_t _max)
|
||||
static const char* strSkipWord(const char* _str, int32_t _max)
|
||||
{
|
||||
for (char ch = *_str++; 0 < _max && (isAlphaNum(ch) || '_' == ch); ch = *_str++, --_max) {};
|
||||
return _str-1;
|
||||
|
||||
Reference in New Issue
Block a user