Ad
  • Custom User Avatar

    i assigned the result string "Take..." without "\n", and then added a check: if it was the last character of the original string, then the work is completed (break), otherwise the result string adds "\n". And then there won't be an extra "\n" at the end of the resulting string.