Skip to content

Commit

Permalink
2.45.9 Bug fix - had rashly removed RXX::lead_nbsp() function that wa…
Browse files Browse the repository at this point in the history
…s still needed - thanks [Rosario] for the bug report
  • Loading branch information
classaxe committed Aug 4, 2022
1 parent 494a853 commit 47bc780
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Utils/Rxx.php
Expand Up @@ -156,6 +156,16 @@ public static function getUtcDateTime($yyyymmdd)
return $dateTime;
}

public static function lead_nbsp($text, $places)
{
$text = html_entity_decode($text);

if (mb_strlen($text) > $places) {
return substr($text, 0, $places);
}
return str_repeat(' ', $places - mb_strlen($text)) . $text;
}

public static function pad_char($text, $char, $places)
{
$text = html_entity_decode($text);
Expand Down

0 comments on commit 47bc780

Please sign in to comment.