Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def reduceString(inputString)
- x = 0
- while (true)
- if inputString[0] != inputString[inputString.length - 1] or inputString == "" then
- return inputString
- end
- inputString = inputString[1...-1]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment