ro() public method

public ro ( ) : Map
return Map
Example #1
0
        private static MimeType parse(string s)
        {
            int    slash = s.IndexOf('/');
            string media = s.Substring(0, slash);
            string sub   = s.Substring(slash + 1);
            Map    pars  = emptyParams();

            int semi = sub.IndexOf(';');

            if (semi > 0)
            {
                pars = doParseParams(sub, semi + 1);
                sub  = sub.Substring(0, semi).Trim();
            }

            MimeType r = new MimeType();

            r.m_str       = s;
            r.m_mediaType = FanStr.lower(media);
            r.m_subType   = FanStr.lower(sub);
            r.m_params    = pars.ro();
            return(r);
        }