Liking cljdoc? Tell your friends :D

brazilian-utils.boleto.format

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.
raw docstring

format-linha-digitavelclj/s

(format-linha-digitavel boleto)

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"

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"
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close