Author: echatellier Date: 2011-05-26 18:00:41 +0200 (Thu, 26 May 2011) New Revision: 2147 Url: http://nuiton.org/repositories/revision/nuiton-utils/2147 Log: Add big warning about split method limit (buggy with special chars). Modified: trunk/nuiton-utils/src/main/java/org/nuiton/util/StringUtil.java Modified: trunk/nuiton-utils/src/main/java/org/nuiton/util/StringUtil.java =================================================================== --- trunk/nuiton-utils/src/main/java/org/nuiton/util/StringUtil.java 2011-05-15 12:18:55 UTC (rev 2146) +++ trunk/nuiton-utils/src/main/java/org/nuiton/util/StringUtil.java 2011-05-26 16:00:41 UTC (rev 2147) @@ -5,7 +5,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2004 - 2010 CodeLutin + * Copyright (C) 2004 - 2011 CodeLutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -23,17 +23,6 @@ * #L% */ -/* * - * StringUtil.java - * - * Created: Sun Apr 14 2002 - * - * @author POUSSIN Benjamin <bpoussin@free.fr> - * Copyright Code Lutin - * @version $Revision$ - * - * Mise a jour: $Date$ - * par : */ package org.nuiton.util; import java.awt.Color; @@ -231,6 +220,11 @@ * this method count the number of open char end close char to split * correctly argument * + * WARNING: cette method ne fonctionne pas si le contenu contient + * des carateres utilisé pour le parsing et présent une seule fois. + * Par exemple: "l'idenfiant" contient ' qui empeche totalement le + * parsing de fonctionner. + * * @param args string to split * @param separator separator use to split string * @return array of string @@ -241,9 +235,14 @@ /** - * Use to split string array representation in array according with swixat - * seperator list - * + * Use to split string array representation in array according with ',' as + * default separator. + * + * WARNING: cette method ne fonctionne pas si le contenu contient + * des carateres utilisé pour le parsing et présent une seule fois. + * Par exemple: "l'idenfiant" contient ' qui empeche totalement le + * parsing de fonctionner. + * * @param stringList string that represent array * @return array with length > 0 if listAsString != null or null */ @@ -260,6 +259,11 @@ * this method count the number of open char end close char to split * correctly argument * + * WARNING: cette method ne fonctionne pas si le contenu contient + * des carateres utilisé pour le parsing et présent une seule fois. + * Par exemple: "l'idenfiant" contient ' qui empeche totalement le + * parsing de fonctionner. + * * @param openingChars list of opening caracteres * @param closingChars list of closing caracteres * @param args string to split