# Left and right division for strings

**URL:** <https://discourse.julialang.org/t/left-and-right-division-for-strings/109839>\
**Category:** Internals & Design\
**Tags:** strings, arithmetic\
**Created:** [February 6, 2024, 9:31pm UTC](https://discourse.julialang.org/t/left-and-right-division-for-strings/109839 "2024-02-06T21:31:04Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 6, 2024, 9:47pm UTC](https://discourse.julialang.org/t/left-and-right-division-for-strings/109839/8 "2024-02-06T21:47:01Z")

</div>

> [@Mason](#):
>
> ```julia
> if endswith(path, ".jl")
> s / ".jl"
> end
> 
> ```

`chopsuffix(s, ".jl")` was added in Julia 1.8.

---

_[View the full topic](https://discourse.julialang.org/t/left-and-right-division-for-strings/109839)._
