Formatting functions for boleto digitable lines.
Provides visual formatting for bank boletos (47 digits) by inserting dots and spaces at standard positions.
Formatting functions for boleto digitable lines. Provides visual formatting for bank boletos (47 digits) by inserting dots and spaces at standard positions.
(format-linha-digitavel boleto)Formats a 47-digit bank boleto by inserting dots and spaces at standard positions.
Field layout (47 digits):
Args: boleto - String containing boleto digits (may include existing formatting)
Returns: Formatted string with dots and spaces, or empty string for blank input
Examples: (format-linha-digitavel "23790000000000000000000000000000000000000000000") ;; => "23790.00000 00000.000000 00000.000000 0 00000000000000"
Formats a 47-digit bank boleto by inserting dots and spaces at standard positions. Field layout (47 digits): - Field 1: 9 digits + DV → 10 (formatted as XXXXX.XXXXX) - Field 2: 10 digits + DV → 11 (formatted as XXXXX.XXXXXX) - Field 3: 10 digits + DV → 11 (formatted as XXXXX.XXXXXX) - Field 4: General DV → 1 (single digit) - Field 5: Due date + value → 14 (unformatted) Args: boleto - String containing boleto digits (may include existing formatting) Returns: Formatted string with dots and spaces, or empty string for blank input Examples: (format-linha-digitavel "23790000000000000000000000000000000000000000000") ;; => "23790.00000 00000.000000 00000.000000 0 00000000000000"
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |