Skip to content

Unexpected behaviour when using str_replace() in string with a dot "." #103

@csrvermaak

Description

@csrvermaak

str_replace seems to randomly replace the first character when trying to replace a "." (might be piping related?)

strtest<-"TOP40TR.Index"
str_replace(strtest,".","X")

Expected:

[1] "TOP40TRXIndex"

Actual:

[1] "XOP40TR.Index"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions