Beispiel #1
0
        public static int GetIndex(string n)
        {
            if (StringValue.IsNullOrEmpty(n))
            {
                return(IntValue.MinusOne);
            }
            var s = IntValue.GetIntBetweenLast(n, '[', ']', IntValue.MinusOne);

            return(!IsIndexed(n) ? IntValue.MinusOne : s);
        }
Beispiel #2
0
        public static bool IsIndexed(string n)
        {
            var i = IntValue.GetIntBetweenLast(n, '[', ']', IntValue.MinusOne);

            if (i == IntValue.MinusOne)
            {
                return(false);
            }
            var s = $"{i}{']'}";

            return(StringValue.Ends(n, s));
        }