Skip to content

Instantly share code, notes, and snippets.

@alexfish
Created July 12, 2012 14:36
Show Gist options
  • Save alexfish/3098507 to your computer and use it in GitHub Desktop.
Save alexfish/3098507 to your computer and use it in GitHub Desktop.
Cleans carrige returns in strings to \n characters for pasting into Xcode localizable.strings file
string = ARGV.first
string = string.gsub(/\n/,"\\n")
file = File.new("output.txt", "w")
file.write(string)
file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment