This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-27
Channels
- # bangalore-clj (1)
- # beginners (11)
- # boot (23)
- # business (2)
- # cider (43)
- # cljs-dev (65)
- # cljsjs (17)
- # cljsrn (4)
- # clojure (144)
- # clojure-austin (4)
- # clojure-berlin (3)
- # clojure-finland (4)
- # clojure-nl (2)
- # clojure-russia (13)
- # clojure-spec (73)
- # clojure-uk (42)
- # clojured (2)
- # clojurescript (166)
- # core-matrix (4)
- # cursive (24)
- # datomic (39)
- # dirac (8)
- # hoplon (97)
- # jobs (2)
- # jobs-rus (11)
- # juxt (16)
- # lein-figwheel (8)
- # leiningen (1)
- # luminus (5)
- # lumo (46)
- # off-topic (1)
- # om (39)
- # onyx (43)
- # overtone (1)
- # pedestal (3)
- # perun (6)
- # play-clj (3)
- # protorepl (14)
- # re-frame (21)
- # reagent (25)
- # remote-jobs (1)
- # ring (1)
- # robots (4)
- # rum (13)
- # specter (5)
- # untangled (72)
- # yada (62)
Need to do the opposite of clojure.string/replace-first
(i.e., replace-last
, which doesn’t exist). Is there a better solution than doing something like: (s/reverse (s/replace-first (s/reverse “foo”) “o” “O”))
(where I want to convert “foo” to “foO”, and s
is clojure.string
)?
@jeffmk one alternative might be to scan the string with repeated calls to index-of
until you get nil
, and then to append everything before the index to a call to replace
on everything after the index. i'm not sure how that would fare performance wise in comparison to your method though since strings are immutable
yeah probs, I'm sure there's a much more elegant solution out there one of the clojure gurus in this channel could give though
I just realized, make sure to use the from-index
param with index-of
otherwise the algo is strictly speaking O(n^2)
Unfortunately I really need regex support, so for now reversing the string 2x may be good enough.
Anyone on here work for Atlassian / bitbucket we are having issues with not having enough seats for users but we have permission for 25 and we only have 9 users right now
@josh_tackett Are you sure you are on the correct slack?