Skip to content

Instantly share code, notes, and snippets.

@matsuyoro
Created February 6, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsuyoro/f8f4db7fd77bbc096608 to your computer and use it in GitHub Desktop.
Save matsuyoro/f8f4db7fd77bbc096608 to your computer and use it in GitHub Desktop.
Swift 指定位置の文字列を置換する ref: http://qiita.com/matsuyoro/items/b0e119256d498a03a60d
var str:NSString = "ABCDEFGHIJKLMNOP"
var pos = NSMakeRange(4,4) // 位置
println(str.stringByReplacingCharactersInRange(pos, withString: "hoge"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment