Files
pico-launcher/arm9/source/core/StringUtil.h
2025-11-25 17:41:31 +01:00

33 lines
1.5 KiB
C++

#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);
};