5 ms·
I'd have hoped Common Lisp would fare well here, but SBCL (1.1.11 on 64-bit Linux Mint 15) is pretty broken. My results: string: noël, reversed: l̈eon, first
by duncan_bayne 13y ago
I'd have hoped Common Lisp would fare well here, but SBCL (1.1.11 on 64-bit Linux Mint 15) is pretty broken. My results:
string: noël, reversed: l̈eon, first 3 chars: noe, length: 5
string: 😸😾, reversed: 😾😸, first 1 char: 😸, length: 2
string: baffle, upcase: BAfflE
string: noël, equals precomposed: NIL
Edited: GNU CLISP 2.49 produces identical results.
- aerique 13y agoI was somewhat disappointed as well. I wrote some tests here: http://paste.lisp.org/display/140280 http://paste.lisp.org/display/140280 Perhaps playing around with different internal representations as pointed out by sedachv (https://news.ycombinator.com/item?id=6811407 https://news.ycombinator.com/item?id=6811407) would work but the initial, naive string usage doesn't work. While I expected the default usage to work correctly in Common Lisp.