Will get_bloginfo(‘url’) return URL with backslash?

The Codex example for home_url() says you want home_url( "https://wordpress.stackexchange.com/" ) to get the blog’s URL with a trailing slash.

Alternatively you could use trailingslashit( home_url() ). That may be safer if your site’s home option somehow ends up stored with a trailing slash, since it looks like get_home_url() assumes it isn’t, but that ought not happen.