I don’t work with strings much, but I have found myself in a few situations before where I’ve done things like
if endswith(path, ".jl")
path[begin:end-3]
end
could instead be
if endswith(path, ".jl")
path / ".jl"
end
That’s a really simple example, but I’ve found a few times when writing string macros, that there’s often prefixes or suffixes I know are there that I want to chop off.