• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

antchfx / xpath
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: matches-empty-nodeset
DEFAULT BRANCH: master
Repo Added 08 May 2017 11:19AM UTC
Files 8
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH rune-correct-string-functions
branch: rune-correct-string-functions
CHANGE BRANCH
x
Reset
  • rune-correct-string-functions
  • 0.1
  • 1.1.0
  • fix-ancestor-predicate-chain
  • fix-group-predicate-last
  • fix-round-mod-numeric-spec
  • fix/clone-nil-input
  • fix/nil-input-clone
  • master
  • matches-empty-nodeset
  • refs/tags/v1.3.0
  • refs/tags/v1.3.1
  • refs/tags/v1.3.2
  • refs/tags/v1.3.3
  • refs/tags/v1.3.4
  • refs/tags/v1.3.5
  • refs/tags/v1.3.6
  • refs/tags/v1.3.7
  • refs/tags/v1.3.8
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.1.10
  • v1.1.11
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.1.5
  • v1.1.6
  • v1.1.7
  • v1.1.8
  • v1.1.9
  • v1.2.0

14 Sep 2026 07:47AM UTC coverage: 84.623% (+0.02%) from 84.602%
34819574471

Pull #139

github

youdie006
Make string-length, substring and translate count characters

XPath 1.0 4.2 defines these in characters; all three index by byte, so
string-length("日本語") is 9 and substring("日本語abc", 2, 2) returns a
byte slice that is not valid UTF-8. stringLengthFunc's own doc comment
already says "number of characters".

The three move together: fixing string-length alone turns the common
idiom substring(s, 1, string-length(s)) from "hello" into a truncated
string, because the length is then in characters but the slice is in
bytes.

normalizespaceFunc already converts to []rune for the same reason.
Pull Request #139: Make string-length, substring and translate count characters

13 of 13 new or added lines in 1 file covered. (100.0%)

2526 of 2985 relevant lines covered (84.62%)

336.04 hits per line

Relevant lines Covered
Build:
Build:
2985 RELEVANT LINES 2526 COVERED LINES
336.04 HITS PER LINE
Source Files on rune-correct-string-functions
  • Tree
  • List 8
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
34819574471 rune-correct-string-functions Make string-length, substring and translate count characters XPath 1.0 4.2 defines these in characters; all three index by byte, so string-length("日本語") is 9 and substring("日本語abc", 2, 2) returns a byte slice that is not valid UTF-8. stringLength... Pull #139 14 Sep 2026 07:48AM UTC youdie006 github
84.62
See All Builds (177)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc