Permalink
Browse files

Put join into StringUtils.

  • Loading branch information...
1 parent 7785901 commit ea96afd988993897d954e9371ec27e2b0909049e @eyecreate committed Aug 22, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/com/andrewshu/android/reddit/common/util/StringUtils.java
@@ -18,5 +18,14 @@ public static boolean listContainsIgnoreCase(ArrayList<String> list, String str)
}
return false;
}
+
+ public static String join(String[] strings, String separator) {
+ StringBuffer sb = new StringBuffer();
+ for (int i=0; i < strings.length; i++) {
+ if (i != 0) sb.append(separator);
+ sb.append(strings[i]);
+ }
+ return sb.toString();
+ }
}

0 comments on commit ea96afd

Please sign in to comment.