diff --git a/String Manipulation/RfCopyMemory.cpp b/String Manipulation/RfCopyMemory.cpp new file mode 100644 index 0000000..229f368 --- /dev/null +++ b/String Manipulation/RfCopyMemory.cpp @@ -0,0 +1,10 @@ +PVOID RfCopyMemory(PVOID Destination, CONST PVOID Source, SIZE_T Length) +{ + PBYTE D = (PBYTE)Destination; + PBYTE S = (PBYTE)Source; + + while (Length--) + *D++ = *S++; + + return Destination; +} diff --git a/String Manipulation/StringLength.cpp b/String Manipulation/StringLength.cpp new file mode 100644 index 0000000..92cab3d --- /dev/null +++ b/String Manipulation/StringLength.cpp @@ -0,0 +1,17 @@ +SIZE_T StringLengthA(LPCSTR String) +{ + LPCSTR String2; + + for (String2 = String; *String2; ++String2); + + return (String2 - String); +} + +SIZE_T StringLengthW(LPCWSTR String) +{ + LPCWSTR String2; + + for (String2 = String; *String2; ++String2); + + return (String2 - String); +} \ No newline at end of file