Skip to content

Range indexing into an AnnotatedStrings gives a SubString instead of a copy #59828

@KristofferC

Description

@KristofferC
julia> Base.AnnotatedString("1 + 2")[1:2] |> typeof
SubString{Base.AnnotatedString{String}}

julia> String("1 + 2")[1:2] |> typeof
String

julia> @view(String("1 + 2")[1:2]) |> typeof
SubString{String}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions