[Bug 301038] String::endsWidth() off-by-one error