How can I confidently increment a string number in Ruby? I understand I can call "1".next and produce "2" but this does not work for negative numbers.
"-3".next
=> "-4"
How can I call to increment both positive and negative string digits? I want to return value as String.
x.to_i.next.to_s"chapter-3"