MCPcopy
hub / github.com/writefreely/writefreely / parseInt

Function parseInt

semver.go:141–156  ·  view source on GitHub ↗
(v string)

Source from the content-addressed store, hash-verified

139}
140
141func parseInt(v string) (t, rest string, ok bool) {
142 if v == "" {
143 return
144 }
145 if v[0] < '0' || '9' < v[0] {
146 return
147 }
148 i := 1
149 for i < len(v) && '0' <= v[i] && v[i] <= '9' {
150 i++
151 }
152 if v[0] == '0' && i != 1 {
153 return
154 }
155 return v[:i], v[i:], true
156}
157
158func parsePrerelease(v string) (t, rest string, ok bool) {
159 // "A pre-release version MAY be denoted by appending a hyphen and

Callers 12

semParseFunction · 0.85
getPageNumFunction · 0.85
ace.jsFile · 0.85
cFunction · 0.85
sFunction · 0.85
HFunction · 0.85
gaFunction · 0.85
UFunction · 0.85
raFunction · 0.85
PropertyValuePartFunction · 0.85
tex-svg-full.jsFile · 0.85
iFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected