Ah, thanks!
On Fri, May 12, 2017 at 11:45 AM, Martin R wrote:
> The enumerateSubstrings method of (NS)String has a
> .byComposedCharacterSequences option which causes Emoji sequences like
> "๐จโ๐ฉโ๐งโ๐ฆ" to be treated as a single unit:
>
> func f(_ s: String) -> [String] {
> var a: [Stri
The enumerateSubstrings method of (NS)String has a
.byComposedCharacterSequences option which causes Emoji sequences like
"๐จโ๐ฉโ๐งโ๐ฆ" to be treated as a single unit:
func f(_ s: String) -> [String] {
var a: [String] = []
s.enumerateSubstrings(in: s.startIndex..https://oleb.net/
FWIW: I can conclude that the third example does not render correctly in
Gmail ...
On Fri, May 12, 2017 at 10:43 AM, Jens Persson wrote:
> I want a function f such that:
>
> f("abc") == ["a", "b", "c"]
>
> f("cafรฉ") == ["c", "a", "f", "รฉ"]
>
> f("๐จโ๐ฉโ๐งโ๐ฆ๐ท๐พโโ๏ธ") == ["๐จโ๐ฉโ๐งโ๐ฆ", "๐ท๐พโโ๏ธ"]
>
> I'm no
I want a function f such that:
f("abc") == ["a", "b", "c"]
f("cafรฉ") == ["c", "a", "f", "รฉ"]
f("๐จโ๐ฉโ๐งโ๐ฆ๐ท๐พโโ๏ธ") == ["๐จโ๐ฉโ๐งโ๐ฆ", "๐ท๐พโโ๏ธ"]
I'm not sure if the last example renders correctly by mail for everyone but
the input String contains these _two_ "natural/visual characters":
(1) A family emoj