klyn.code.css.CssTokenizer.scanNumberEnd
method
public override scanNumberEnd(line as String, start as Long) as Long
Description

Scans a CSS numeric literal including optional unit suffixes (px, rem, em, %, vh, vw, s, ms, deg).

Parameters
ParameterDescription
lineSource line text.
startInclusive start index of the number.
Returns

Exclusive end index of the number and its unit suffix.

Example
import klyn.code.css

t = CssTokenizer()
assert t.scanNumberEnd("16px;", 0) == 4
assert t.scanNumberEnd("100%", 0) == 4