Remove trailing slash, if str ends with slash, it will be removed.
删除斜杆后缀,如果字符串以斜杠结尾,则将删除。
The string to remove trailing slash. / 要删除后缀的字符串
The string with trailing slash. / 删除后缀后的字符串
removeTrailingSlash('/foo/bar/') // => /foo/bar Copy
removeTrailingSlash('/foo/bar/') // => /foo/bar
Remove trailing slash, if str ends with slash, it will be removed.
删除斜杆后缀,如果字符串以斜杠结尾,则将删除。