-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add documentation of SubString #23957
Conversation
`SubString` first appears in the section of regular expressions, but it is not mentioned earlier. I suggest to add documentation of `SubString` as it is returned by several functions from the standard library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to suggest adding a @ref
to a SubString
but it seems there is no corresponding docstring for SubString
.
Thanks! I find it more natural to add this description after the presentation of |
@nalimilan moved, I agree that it is better placed here. |
doc/src/manual/strings.md
Outdated
SubString{String} | ||
``` | ||
|
||
`SubString` works like [`getindex`](@ref), but it does not make a copy of the parent string. Several |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, one problem is that getindex
isn't presented for strings. Maybe just say that indexing in the examples presented above make a copy, but that one can also use SubString
. Also, it would make more sense IMHO to say this before the examples: else, it's not clear what a "view" is nor why one would want to create a view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I also thought after committing - I hope the current wording is clear. Sorry for the confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good! If you want to add a docstring for SubString
in another PR, you're welcome!
I would add |
As |
I am not an expert on C internals of Julia, but |
SubString
first appears in the section of regular expressions, but it is not mentioned earlier. I suggest to add documentation ofSubString
as it is returned by several functions from the standard library.