mirror of
https://github.com/vxunderground/VX-API
synced 2024-06-28 09:41:13 +00:00
32 lines
541 B
C++
32 lines
541 B
C++
PCHAR StringTerminateStringAtCharA(PCHAR String, INT Character)
|
|
{
|
|
DWORD Length = (DWORD)StringLengthA(String);
|
|
|
|
for (DWORD Index = 0; Index < Length; Index++)
|
|
{
|
|
if (String[Index] == Character)
|
|
{
|
|
String[Index] = '\0';
|
|
return String;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
PWCHAR StringTerminateStringAtCharW(PWCHAR String, INT Character)
|
|
{
|
|
DWORD Length = (DWORD)StringLengthW(String);
|
|
|
|
for (DWORD Index = 0; Index < Length; Index++)
|
|
{
|
|
if (String[Index] == Character)
|
|
{
|
|
String[Index] = '\0';
|
|
return String;
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
}
|