Add files via upload
This commit is contained in:
parent
0d375fb7c2
commit
242eee09e8
31
Stdio/StringTerminateStringAtChar.c
Normal file
31
Stdio/StringTerminateStringAtChar.c
Normal file
@ -0,0 +1,31 @@
|
||||
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 StringTerminateStringAtCharA(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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user