refactor cmpNimIdentifier (#16611)
* refactor cmpNimIdentifier * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
parent
61fd19c7e6
commit
b727217229
3 changed files with 7 additions and 9 deletions
|
|
@ -70,3 +70,7 @@ template endsWithImpl*[T: string | cstring](s, suffix: T) =
|
|||
if s[i+j] != suffix[i]: return false
|
||||
inc(i)
|
||||
if i >= suffixLen: return true
|
||||
|
||||
|
||||
func cmpNimIdentifier*[T: string | cstring](a, b: T): int =
|
||||
cmpIgnoreStyleImpl(a, b, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue