Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra procs & docs for the unicode module #2353

Closed
jboy opened this issue Mar 16, 2015 · 0 comments

Comments

Projects
None yet
3 participants
@jboy
Copy link
Contributor

commented Mar 16, 2015

This issue relates to recent discussion in the forum thread Unicode strings.

I think the unicode module would be more beginner-friendly with the following additions:

  1. A new proc runes(s: string): seq[Rune] that would be similar to iterator runes(s: string): Rune.
  2. Additional documentation in the module header comment that links readers to the following generic seq[T] procs in the system module:
    • find[T, S](a: T; item: S): int
    • contains[T](a: openArray[T]; item: T): bool
    • insert[T](x: var seq[T]; item: T; i = 0)
    • delete[T](x: var seq[T]; i: int)
    • add[T](x: var seq[T]; y: T)
    • add[T](x: var seq[T]; y: openArray[T])
  3. Additional documentation in the module header comment that links readers to the following generic seq[T] procs in the sequtils module (which will hopefully soon be moved into the system module):
    • insert[T](dest: var seq[T]; src: openArray[T]; pos = 0)
    • delete[T](s: var seq[T]; first = 0; last = 0)
  4. Additional documentation in the module header comment that links readers to the following generic seq[T] procs that will hopefully soon be added:
    • find[T](haystack: openArray[T]; needle: openArray[T]): int
    • contains[T](haystack: openArray[T]; needle: openArray[T]): bool

apense added a commit to apense/Nim that referenced this issue Jul 4, 2015

@data-man data-man added the Unicode label Apr 30, 2018

narimiran added a commit to narimiran/Nim that referenced this issue Jan 3, 2019

[backport] improve unicode docs, fixes nim-lang#2353 [ci skip]
* as instructed in nim-lang#2353, provides a short description why
there are no specialized procs for seq[Rune]
* adds several examples to better explain what some functions do
* small fixes (double backticks, add missing dots, etc.)

@narimiran narimiran closed this in 69149a0 Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.