From: Michael D. <mik...@us...> - 2004-07-12 01:30:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8027/Util Modified Files: StringHelper.cs Log Message: Added some comments about the diff between the various overloads of StringHelper.Split() Index: StringHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/StringHelper.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** StringHelper.cs 23 Jun 2004 21:00:24 -0000 1.13 --- StringHelper.cs 12 Jul 2004 01:30:21 -0000 1.14 *************** *** 65,76 **** /// <param name="list">the string that will be broken into tokens</param> /// <returns></returns> ! public static string[] Split(string separators, string list) { return list.Split(separators.ToCharArray()); } ! public static string[] Split(string separators, string list, bool include) { StringTokenizer tokens = new StringTokenizer(list, separators, include); ArrayList results = new ArrayList(); ! foreach(string token in tokens) { results.Add( token ); } --- 65,90 ---- /// <param name="list">the string that will be broken into tokens</param> /// <returns></returns> ! public static string[] Split(string separators, string list) ! { return list.Split(separators.ToCharArray()); } ! /// <summary> ! /// Splits the String using the StringTokenizer. ! /// </summary> ! /// <param name="separators">separators for the tokens of the list</param> ! /// <param name="list">the string that will be broken into tokens</param> ! /// <param name="include">true to include the seperators in the tokens.</param> ! /// <returns></returns> ! /// <remarks> ! /// This is more powerful than Split because you have the option of including or ! /// not including the seperators in the tokens. ! /// </remarks> ! public static string[] Split(string separators, string list, bool include) ! { StringTokenizer tokens = new StringTokenizer(list, separators, include); ArrayList results = new ArrayList(); ! foreach(string token in tokens) ! { results.Add( token ); } |