Skip to content

Instantly share code, notes, and snippets.

@kennycason
Last active December 10, 2015 09:58
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 kennycason/4417644 to your computer and use it in GitHub Desktop.
Save kennycason/4417644 to your computer and use it in GitHub Desktop.
public String get(String key, Object... o){
if(o == null){
return texts.getString(key);
} else {
String str = texts.getString(key);
for(int i = 0; i < o.length; i++) {
str = str.replace("{" + i + "}", o[i].toString());
}
return str;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment