Exemple #1
0
        public Path GetChildNameOrSelfIfNoChild()
        {
            Path path = this.NormalizeSlashes()
                        .TrimEndSlash();

            int iLastSlash = path.LastIndexOf(CorrectSlash);

            if (iLastSlash == -1)
            {
                return(path);
            }

            return(new Path(CorrectSlash, WrongSlash, path._rawPath.Substring(iLastSlash + 1)));
        }