Skip to content

Instantly share code, notes, and snippets.

View danielleswank's full-sized avatar

Danielle Swank danielleswank

View GitHub Profile
@danielleswank
danielleswank / gist:11385335
Last active August 29, 2015 14:00
iOS to Android string converter in JS
/*
based on https://gist.github.com/florianmski/3442664
and https://github.com/tmurakam/cashflow/blob/0a01ac9e0350dfb04979986444244f8daf4cb5a8/android/convertStrings.rb
support for existing directories
output by default to res/values-lang/strings.xml
usage: node gist.js inputDir(optional) outputDir(optional)
ex 1: node gist.js
ex 2: node gist.js Localizations res
*/
/// ^ (
?: [-=]> # function
| [-+*/%<>&|^!?=]= # compound assign / compare
| >>>=? # zero-fill right shift
| ([-+:])\1 # doubles
| ([&|<>])\2=? # logic / shift
| \?\. # soak access
| \.{2,3} # range or splat
) ///