Road to 0.6.0
- readd the c++ linear allocator for 3ds - start switching from PD::Vec to std::vector - Add Color::Hex as constexpr for compiletime color converts - Add FNV Hasing functions - Make UI7 ids be able to be generated at compile time - Added a Throw Function (for whatever) - Added HexCHar2Int (replaces the lookup table) - Made u128 fully constexpr
This commit is contained in:
@@ -30,6 +30,13 @@ namespace PD {
|
||||
* Set of String Utillity Functions
|
||||
*/
|
||||
namespace Strings {
|
||||
constexpr int HexChar2Int(char c) {
|
||||
/** Imagine mat hat ne lookup table dafür verwendet :/ */
|
||||
if (c >= '0' && c <= '9') return c - '0';
|
||||
if (c >= 'a' && c <= 'f') return 10 + (c - 'a');
|
||||
if (c >= 'A' && c <= 'F') return 10 + (c - 'a');
|
||||
return -1; // Error
|
||||
}
|
||||
/**
|
||||
* Check if a String ends with a specific extension
|
||||
* @param str Input string
|
||||
|
||||
Reference in New Issue
Block a user