diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/compare_string_array.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 731d3d8..7b5ce85 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c @@ -67,3 +67,12 @@ int index_in_substrings(const char *strings, const char *key) } return -1; } + +const char *nth_string(const char *strings, int n) +{ + while (n) { + n--; + strings += strlen(strings) + 1; + } + return strings; +} |