Add StringUtils::Copy for char to Char
This commit is contained in:
@@ -28,6 +28,18 @@ int32 StringUtils::Copy(char* dst, const Char* src, int32 count)
|
||||
return i;
|
||||
}
|
||||
|
||||
int32 StringUtils::Copy(Char* dst, const char* src, int32 count)
|
||||
{
|
||||
int32 i = 0;
|
||||
while (i < count && src[i])
|
||||
{
|
||||
dst[i] = (Char)src[i];
|
||||
i++;
|
||||
}
|
||||
dst[i] = 0;
|
||||
return i;
|
||||
}
|
||||
|
||||
const Char* StringUtils::FindIgnoreCase(const Char* str, const Char* toFind)
|
||||
{
|
||||
if (toFind == nullptr || str == nullptr)
|
||||
|
||||
@@ -128,6 +128,9 @@ public:
|
||||
// Copies the string (count is maximum amount of characters to copy). Returns amount of copied elements (excluding null terminator character).
|
||||
static int32 Copy(char* dst, const Char* src, int32 count);
|
||||
|
||||
// Copies the string (count is maximum amount of characters to copy). Returns amount of copied elements (excluding null terminator character).
|
||||
static int32 Copy(Char* dst, const char* src, int32 count);
|
||||
|
||||
// Finds specific sub-string in the input string. Returns the first found position in the input string or nulll if failed.
|
||||
static const Char* Find(const Char* str, const Char* toFind);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user