Skip to content

Commit abec449

Browse files
authored
Merge pull request #197 from rajatsharma94/5.2
added nbsp() to generate repeated &nbsp tag
2 parents 9f534cb + eb132ae commit abec449

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/HtmlBuilder.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,18 @@ public function email($email)
277277
return str_replace('@', '@', $this->obfuscate($email));
278278
}
279279

280+
/**
281+
* Generates non-breaking space entities based on number supplied.
282+
*
283+
* @param int $num
284+
*
285+
* @return string
286+
*/
287+
public function nbsp($num = 1)
288+
{
289+
return str_repeat(' ', $num);
290+
}
291+
280292
/**
281293
* Generate an ordered list of items.
282294
*

0 commit comments

Comments
 (0)