Description Usage Arguments Details Examples
Replaces .
with \.
in strings.
1 2 3 | str_escape(string, x, escape = "\\")
str_escape_dot(string, x = ".", escape = "\\")
|
string |
string |
x |
string to be escaped, usually a single character. |
str_escape
escapes all instances of x
in a string by \
. This
is handy when working with regular expressions, file descriptors, etc. where
certain characters have special meaning. By escaping, the character will
match litereally instead of using their special meanings.
str_escape_dot
wraps str_escape
using x='.'
and escape='\\'
1 2 3 4 5 | str_escape( "path/to/file", "/" )
str_escape( "path/to/file", "/", "\\" )
str_escape_dot("hello.world") # "hello\\.world"
str_escape_dot("foo.bar.baz") # "foo\\.bar\\.baz"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.