Skip to contents

This function ensures that a given URL string ends with a slash ('/'). If the URL does not end with a slash, it appends one.

Usage

.add_slash_if_missing(url)

Arguments

url

A character string representing the URL.

Value

A character string with a trailing slash if it was missing.