com.atlassian.confluence.macro.params
Class MacroParamUtils

java.lang.Object
  extended by com.atlassian.confluence.macro.params.MacroParamUtils

public class MacroParamUtils
extends Object

Utility methods for macro parameters


Constructor Summary
MacroParamUtils()
           
 
Method Summary
static List<String> parseCommaSeparatedStrings(String str)
          Efficiently parses comma separated lists and trims the whitespace for each element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroParamUtils

public MacroParamUtils()
Method Detail

parseCommaSeparatedStrings

public static List<String> parseCommaSeparatedStrings(String str)
Efficiently parses comma separated lists and trims the whitespace for each element. Ignores blank elements. The string " foo,,, bar , baz" returns a list [foo, bar, baz] Does a single pass on the string with 2 pointers to keep track of the start and end of the current word.

Parameters:
str - The comma separated input string
Returns:
A list of elements from the string


Copyright © 2003-2012 Atlassian. All Rights Reserved.