Added a way to delete a range of characters at any index and count.

This commit is contained in:
2022-07-05 19:32:58 -05:00
parent 5b5036b996
commit 0a61197cb6
3 changed files with 65 additions and 0 deletions
+15
View File
@@ -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;