I'm trying to convert the return value of the .split() function into a string.
There is a string of characters that is being parsed from a text file, and I need to change it from an array to a string.
After calling the split function, the result is an array, however, I need it to be a string to perform character operations and functions.
example = "--NAME: John Doe"
print example
value = example.split("--NAME: ")
print value.class
value.to_s.strip
print value
print value.class
split) are needed. Just say what you want to achieve. This may be what's sometimes called an "X-Y Problem"."--NAME: "actually a delimiter? To me it looks more like a prefix / label.