Class ParseSrcSetUtils


  • public final class ParseSrcSetUtils
    extends Object
    Utility class to parse the text representation of srcset. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Attributes. See http://www.w3.org/html/wg/drafts/html/master/semantics.html#attr-img-srcset.
    Author:
    nhant01, GeorgeLuo
    • Method Detail

      • parseSrcset

        public static SrcsetParsingResult parseSrcset​(@Nonnull
                                                      String srcset)
        Parses the text representation of srcset into array of SrcsetSourceDef. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Attributes. See http://www.w3.org/html/wg/drafts/html/master/semantics.html#attr-img-srcset. If parsing fails, returns false in SrcsetParsingResult.status.
        Parameters:
        srcset - the srcset.
        Returns:
        returns SrcsetParsingResult.