mb_str_pad()
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = 1, ?string $encoding = null): string
Pads a string to a character length using the requested side and encoding.
Parameters:
$string(string)$length(int)$pad_string(string), default' ', optional$pad_type(int), default1, optional$encoding(?string), defaultnull, optional
Returns: string
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/mb_str_pad.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how mb_str_pad is implemented in the compiler, see the internals page.