src/Azos.Wave/WorkMatch.cs
/// <summary>
/// Converts a string with a list of separated pairs into a list i.e. "a=1;b=2"
/// </summary>
Converts a string with a list of separated pairs into a list i.e.
Converts a string with a list of separated pairs into a list i . e .
public static List<NameValuePair> ParseList(string list)
                {
                  var result = new List<NameValuePair>();
                  var segs = list.Split(LIST_DELIMITERS, StringSplitOptions.RemoveEmptyEntries);
                  foreach(var seg in segs)
                  {
                    var ieq = seg.IndexOf('=');
                    if (ieq>=1 && ieq<seg.Length-1)
                     result.Add(new NameValuePair(Uri.UnescapeDataString(seg.Substring(0, ieq)), Uri.UnescapeDataString(seg.Substring(ieq+1))));
                    else
                     result.Add(new NameValuePair(seg, null));
                  }
                  return result;
                }
public static List < NameValuePair > ParseList ( string list ) { var result = new List < NameValuePair > ( ) ; var segs = list . Split ( LIST_DELIMITERS , StringSplitOptions . RemoveEmptyEntries ) ; foreach ( var seg in segs ) { var ieq = seg . IndexOf ( ' ' ) ; if ( ieq >= 1 && ieq < seg . Length - 1 ) result . Add ( new NameValuePair ( Uri . UnescapeDataString ( seg . Substring ( 0 , ieq ) ) , Uri . UnescapeDataString ( seg . Substring ( ieq + 1 ) ) ) ) ; else result . Add ( new NameValuePair ( seg , null ) ) ; } return result ; }
Converts a string with a list of separated pairs into a list i.e.
Converts a string with a list of separated pairs into a list i . e .
list
string