minus-squareSolemarc@lemmy.worldtoRust@programming.dev•Rust code to find palindrome string in rustlinkfedilinkarrow-up7·edit-218 days agoI didn’t see it mentioned but you could remove all trailing & leading whitespace with: input = input.trim(); Instead of using replace. linkfedilink
I didn’t see it mentioned but you could remove all trailing & leading whitespace with:
input = input.trim();
Instead of using replace.