Initial commit

This commit is contained in:
Gericom
2025-11-22 17:21:45 +01:00
commit 5d6f67c612
517 changed files with 63025 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
class StringUtil
{
public:
/// @brief Copies the null terminated string in src to the
/// dst buffer of size dstSize. If dstSize > 0 the dst
/// buffer is guarenteed to be null terminated, even
/// if src is truncated to fit in dst.
/// @param dst The destination buffer.
/// @param src The source string (null terminated).
/// @param dstLength The length of the destination buffer in characters.
static u32 Copy(char* dst, const char* src, u32 dstLength);
/// @brief Copies the null terminated string in src to the
/// dst buffer of size dstSize. If dstSize > 0 the dst
/// buffer is guarenteed to be null terminated, even
/// if src is truncated to fit in dst.
/// @param dst The destination buffer.
/// @param src The source string (null terminated).
/// @param dstLength The length of the destination buffer in char16_t characters.
static u32 Copy(char16_t* dst, const char16_t* src, u32 dstLength);
/// @brief Copies the null terminated string in src to the
/// dst buffer of size dstSize. If dstSize > 0 the dst
/// buffer is guarenteed to be null terminated, even
/// if src is truncated to fit in dst.
/// @param dst The destination buffer.
/// @param src The source string (null terminated).
/// @param dstLength The length of the destination buffer in char16_t characters.
static u32 Copy(char16_t* dst, const char* src, u32 dstLength);
};