Advertisements

trailingslashit

Definition:
function trailingslashit($string) {}

Appends a trailing slash.
Will remove trailing slash if it exists already before adding a trailing slash. This prevents double slashing a string or path.

Parameters

  • string $string: What to add the trailing slash to.

Return values

returns:String with trailing slash added.

Source code

function trailingslashit($string) {

	return untrailingslashit($string) . '/';

}

3079

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: