經安全檢測,此網站為安全網站,請放心前往原始網址!

Reverse a string - Rosetta Code

asdf fdsa [edit] Nial reverse 'asdf' =fdsa [edit] Nimrod import unicode proc reverse(s: var string) = for i in 0 .. s.high div 2: swap(s[i], s[s.high - i]) proc reversed(s: string): string = result = newString(s.len) for i,c in s: result[s.high - i] = c p

rosettacode.org

網址安全性掃描由 google 提供