Deprecate xlen() for strings and seqs (#8782)
* deprecates xlen() for strings and seqs * added docs
This commit is contained in:
parent
e9b665f338
commit
96d44fdd0a
1 changed files with 7 additions and 2 deletions
|
|
@ -4055,10 +4055,15 @@ proc procCall*(x: untyped) {.magic: "ProcCall", compileTime.} =
|
||||||
## procCall someMethod(a, b)
|
## procCall someMethod(a, b)
|
||||||
discard
|
discard
|
||||||
|
|
||||||
proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect.} = discard
|
proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect,
|
||||||
proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.} =
|
deprecated: "use len() instead".} =
|
||||||
|
## **Deprecated since version 0.18.1**. Use len() instead.
|
||||||
|
discard
|
||||||
|
proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect,
|
||||||
|
deprecated: "use len() instead".} =
|
||||||
## returns the length of a sequence or a string without testing for 'nil'.
|
## returns the length of a sequence or a string without testing for 'nil'.
|
||||||
## This is an optimization that rarely makes sense.
|
## This is an optimization that rarely makes sense.
|
||||||
|
## **Deprecated since version 0.18.1**. Use len() instead.
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue