Exemplo n.º 1
0
        /// <summary>
        ///     Go through an array, determining if TextValue contains any substrings in the array.
        ///     If it does, returns true, and updates the ValuesFound array.
        /// </summary>
        /// <param name="array"></param>
        /// <param name="textValue"></param>
        /// <param name="CaseSensitive"></param>
        /// <returns></returns>
        public static bool TextContainsArraySubstrings(string[] array, string textValue, ref string[] valuesFound)
        {
            valuesFound = new string[0];
            var esa            = new ClsEditableStringArray();
            var textValueUpper = textValue.ToUpper();
            var result         = false;

            foreach (var thisArrayValue in array)
            {
                var avUpper = thisArrayValue.ToUpper();
                if (textValueUpper.Contains(avUpper))
                {
                    result = true;
                    esa.Append(thisArrayValue);
                }
            }

            valuesFound = esa.Data;
            esa         = null;
            return(result);
        }
Exemplo n.º 2
0
        public static string[] CreateArrayFromString(string multilineString)
        {
            var sa = new ClsEditableStringArray(multilineString);

            return(sa.Data);
        }
Exemplo n.º 3
0
 /// <summary>
 ///     Create new instance by copying data from another instance.
 /// </summary>
 /// <param name="saClassToCopyFrom"></param>
 public ClsEditableStringArray(ClsEditableStringArray saClassToCopyFrom)
 {
     _mData = saClassToCopyFrom.Copy(0, saClassToCopyFrom.Data.Length);
 }