Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Append to path and work correctly with or without trailing slash in url #34
I was thinking about adding a function
Could it simply append it after the filename? I'm not sure what would be the expected behavior, but I'm basically looking for a way to append and I don't have to deal with filenames in this instance.
Is there a common use case for appending something to the path but have it be inserted before a filename anyhow?
I think an append method that goes after everything but before the query string and hash would satisfy my requirement, but might need to call it something other than pathSegment if it appends after a filename?
Of course it could, this would be the simplest approach.
no idea. that's why I'm looking for some input.
well, pathSegment() or even segment() is just fine, as long as appending is a tertiary operation.