I was thinking about how to make this with the StringReverse
, but I failed:
I have a sequence of (for example):
str = "FDSRTYNHFNKHLIUHG";
I wish to reverse a randomly long contiguous sequence of characters starting at a random location, for example FDSRTYNHFNKHLIHUG (UH-HU), but it can also be FDSFHNYTRNKHLIUHG (RTYNHF-FHNYTR). Do you have some good ideas? Thank you!!!