What do you think about using Chat GPT to create functions in D?
I asked Chat-GPT to create a function in D that was similar to
the rsplit() function in Python. It returned this code to me:
import std.algorithm;
import std.array;
import std.string;
string[] rsplit(string input, string separator, size_t maxsplit =
size_t.max) {
auto splitter = splitter(input, separator, SplitterFlag.all);
auto results = splitter.array;
if (maxsplit < results.length - 1)
results = results[results.length - maxsplit - 1 .. $];
return results;
}