Added a way to delete a range of characters at any index and count.
This commit is contained in:
@@ -58,6 +58,21 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
if (input[0] == 'r') {
|
||||
if (input[1] != '\0') {
|
||||
printf("Select index: ");
|
||||
fgets(input, sizeof input, stdin);
|
||||
|
||||
int num = strtol(input, NULL, 10);
|
||||
printf("Enter count: ");
|
||||
|
||||
fgets(input, sizeof input, stdin);
|
||||
|
||||
int count = strtol(input, NULL, 10);
|
||||
|
||||
TStringRemoveRange(num, count, string);
|
||||
|
||||
continue;
|
||||
}
|
||||
TStringPop(glyph, string);
|
||||
printf("Popped '%s'\n", glyph);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user