Implemented new function...

This commit is contained in:
Ognjen Milan Robovic 2023-10-29 06:57:18 -04:00
parent 9d8d83d38f
commit cc0701d408
2 changed files with 20 additions and 0 deletions

View File

@ -698,6 +698,24 @@ int string_split_space (char * string) {
return (++count);
}
char * string_realign (char * string, int amount, char character) {
int offset, length;
length = string_length (string);
for (offset = 0; offset != length; ++offset) {
string [amount - offset - 1] = string [length - offset - 1];
}
for (offset = 0; offset != amount - length; ++offset) {
string [offset] = character;
}
string [amount] = '\0';
return (string);
}
void memory_delete (void * memory, int length) {
int i = 0;

View File

@ -121,6 +121,8 @@ extern char * string_concatenate_limit (char * string_0, char * string_1, int li
extern int string_split_space (char * string);
extern char * string_realign (char * string, int amount, char character);
extern void memory_delete (void * memory, int length);
extern int memory_compare (void * memory, void * source, int length);