1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Fix fast leaves with texture_clean_transparent enabled.

This commit is contained in:
Aaron Suen 2015-04-01 08:26:57 -04:00 committed by Craig Robbins
parent 400c6087b6
commit 1fb3d1156c
2 changed files with 37 additions and 17 deletions

View file

@ -151,6 +151,24 @@ inline bool str_starts_with(const std::basic_string<T> &str,
return true;
}
/**
* Check whether \p str begins with the string prefix. If \p case_insensitive
* is true then the check is case insensitve (default is false; i.e. case is
* significant).
*
* @param str
* @param prefix
* @param case_insensitive
* @return true if the str begins with prefix
*/
template <typename T>
inline bool str_starts_with(const std::basic_string<T> &str,
const T *prefix,
bool case_insensitive = false)
{
return str_starts_with(str, std::basic_string<T>(prefix),
case_insensitive);
}
/**
* Splits a string into its component parts separated by the character