src/Azos/Data/Attributes.cs
/// <summary>
/// Returns a string parsed into key values as:  val1: descr1,val2: desc2...
/// </summary>
Returns a string parsed into key values as:  val1: descr1,val2: desc2
Returns a string parsed into key values as : val1 : descr1 val2 : desc2
public static JSONDataMap ParseValueListString(string valueList, bool caseSensitiveKeys = false)
        {
            var result = new JSONDataMap(caseSensitiveKeys);
            if (valueList.IsNullOrWhiteSpace()) return result;
            var segs = valueList.Split(',','|',';');
            foreach(var seg in segs)
            {
              var i = seg.LastIndexOf(':');
              if (i>0&&i<seg.Length-1) result[seg.Substring(0,i).Trim()] = seg.Substring(i+1).Trim();
              else
                result[seg] = seg;
            }
            return result;
        }
public static JSONDataMap ParseValueListString ( string valueList , bool caseSensitiveKeys = false ) { var result = new JSONDataMap ( caseSensitiveKeys ) ; if ( valueList . IsNullOrWhiteSpace ( ) ) return result ; var segs = valueList . Split ( ' ' , ' ' , ' ' ) ; foreach ( var seg in segs ) { var i = seg . LastIndexOf ( ' ' ) ; if ( i > 0 && i < seg . Length - 1 ) result [ seg . Substring ( 0 , i ) . Trim ( ) ] = seg . Substring ( i + 1 ) . Trim ( ) ; else result [ seg ] = seg ; } return result ; }
Returns a string parsed into key values as:  val1: descr1,val2: desc2...
Returns a string parsed into key values as : val1 : descr1 val2 : desc2 ...
valueList
string
caseSensitiveKeys
bool