From 421cf7f1e49821c22e2f37879d8aac11072c01cb Mon Sep 17 00:00:00 2001 From: shaper Date: Thu, 31 Oct 2002 01:44:25 +0000 Subject: [PATCH] Renamed joinEscaped() variant that allows specifying whether to escape the string to the more sensible join(). git-svn-id: https://samskivert.googlecode.com/svn/trunk@883 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../java/com/samskivert/util/StringUtil.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/StringUtil.java b/projects/samskivert/src/java/com/samskivert/util/StringUtil.java index 8891f7c7..8cfd252d 100644 --- a/projects/samskivert/src/java/com/samskivert/util/StringUtil.java +++ b/projects/samskivert/src/java/com/samskivert/util/StringUtil.java @@ -1,5 +1,5 @@ // -// $Id: StringUtil.java,v 1.40 2002/10/31 01:24:10 shaper Exp $ +// $Id: StringUtil.java,v 1.41 2002/10/31 01:44:25 shaper Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -703,19 +703,7 @@ public class StringUtil */ public static String join (String[] values) { - return joinEscaped(values, false); - } - - /** - * Joins an array of strings into a single string, separated by - * commas, and escaping commas that occur in the individual string - * values such that a subsequent call to {@link #parseStringArray} - * would recreate the string array properly. Any elements in the - * values array that are null will be treated as an empty string. - */ - public static String joinEscaped (String[] values) - { - return joinEscaped(values, true); + return join(values, false); } /** @@ -726,7 +714,7 @@ public class StringUtil * elements in the values array that are null will be treated as an * empty string. */ - public static String joinEscaped (String[] values, boolean escape) + public static String join (String[] values, boolean escape) { StringBuffer buf = new StringBuffer(); int vlength = values.length; @@ -740,6 +728,18 @@ public class StringUtil return buf.toString(); } + /** + * Joins an array of strings into a single string, separated by + * commas, and escaping commas that occur in the individual string + * values such that a subsequent call to {@link #parseStringArray} + * would recreate the string array properly. Any elements in the + * values array that are null will be treated as an empty string. + */ + public static String joinEscaped (String[] values) + { + return join(values, true); + } + /** * Splits the supplied string into components based on the specified * separator string.