string convertString(int $flags, string $string)
•$flags - tells the function what to do to $string
•1 - convert character entities (for example, convert " to ")
•2 - extracts a link from a string in the format linkpage("link") or linkpage('link'); returns an empty string if no link can be extracted (New v4.5031)
•4 - try to extract a charset from $string by returning what is found after "charset=" in $string; returns the extracted charset or an empty string if a charset could not be extracted (New v4.9910)
•8 - convert consecutive whitespace characters in $string to single space characters (New v5.9910)
•16 - remove space characters in $string (New v5.9930)
•32 - URL decode (New v7.9914)
•65536 - remove preceding and trailing whitespace characters from $string (New v5.9910); it is now recommended that trim() be used instead
•If $flags specifies unknown flags or an error occurs, then the function may return $string unmodified. It will not generate an error.
string convertStringEx(int $mode, string $string)
•$mode - tells the function what to do to $string
•1 - remove all non-alpha characters including whitespace
•2 - remove all non-alpha, non-digital characters including whitespace (New v9.9914)
•3 - try to extract a file extension from $string and return it; else returns an empty string (New v10.0146)
•4 - if possible, return a CSS equivalent string like ", like style=\"clear: both\"" based on $string which is the value of a "clear" attribute, else returns an empty string (New v12.0035)
•If $mode is unknown or an error occurs, then the function will, in most cases, return $string unmodified. It will not generate an error.
•This function is supported only in CSE HTML Validator v8.00 and later.