Skip to content

Instantly share code, notes, and snippets.

@jaminguy
Created September 24, 2015 15:58

Revisions

  1. jaminguy created this gist Sep 24, 2015.
    3 changes: 3 additions & 0 deletions Swift string replace
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    let replaced = String(aString.characters.map {
    $0 == " " ? "+" : $0
    })