Skip to content

replaceLetterWithDigits

elcapo edited this page Oct 16, 2014 · 4 revisions

replaceLetterWithDigits changes letters in a given string with its correspondent numbers, as described in ECBS EBS204 V3.2 [August 2003] document: A=1, B=2, ..., Y=34, Z=35.

Usage

/* MySQL */
SELECT replaceLetterWithDigits(
           '510007547061BE00' );
/* Returns 510007547061111400 */
/* JavaScript */
var cleanString = replaceLetterWithDigits(
                      '510007547061BE00' );
/* cleanString = 510007547061111400 */
/* PHP */
$cleanString = replaceLetterWithDigits(
                   '510007547061BE00' );
/* $cleanString = 510007547061111400 */

Return values

  • [string] - After replacing letters with numbers (A=1, ..., Z=35).

Category

This function is part of the [International Bank Account Numbers (IBAN)](International Bank Account Numbers (IBAN)) package.

SEPA validations

  • [International Bank Account Numbers (IBAN)](International Bank Account Numbers (IBAN))

Spanish validations

Helpers

  • [Common functions](Common functions)
Clone this wiki locally