简体   繁体   中英

reverse the order of characters in a string

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

In string "12345", out string "54321". Preferably without third party tools and regex.

Try Perl:

echo 12345 | perl -nle 'print scalar reverse $_'

Source: Perl one-liners

In string "12345", out string "54321". Preferably without third party tools and regex.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM