mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2026-04-07 17:33:33 +00:00
pass len of input to replace_multiple_space_with_one()
add an input prompt to interactive mode
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
void replace_multiple_space_with_one(char *s)
|
||||
void replace_multiple_space_with_one(char *s, size_t len)
|
||||
{
|
||||
int j = 0;
|
||||
int count = 0;
|
||||
int len = strlen(s);
|
||||
|
||||
if (len == 1 && (s[0] == ' ' || s[0] == '\t'))
|
||||
{
|
||||
@@ -33,6 +32,4 @@ void replace_multiple_space_with_one(char *s)
|
||||
}
|
||||
}
|
||||
s[j] = '\0';
|
||||
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user