juan_gandhi: (VP)
[personal profile] juan_gandhi
scala> "abc|def" split "|"
res4: Array[String] = Array("", a, b, c, |, d, e, f)

Answer:

scala> "abc|def" split "\\|"
res5: Array[String] = Array(abc, def)

Date: 2014-03-02 04:56 am (UTC)
From: [identity profile] alexey-rom.livejournal.com
Ну это всё-таки Java puzzle.

Date: 2014-03-02 06:05 am (UTC)
nine_k: A stream of colors expanding from brain (Default)
From: [personal profile] nine_k
If I were them I'd make regexp a separate string type, buildable from plain strings but distinct for type-checking purposes.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 25th, 2025 08:04 am
Powered by Dreamwidth Studios