Tinderbox v11 Icon

isbn13(dataStr)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Data Type Returned: 

Operator First Added: 

Operator in Current Baseline: 

Operator Last Altered: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Data manipulation  [other Data manipulation operators]

 String [about String data type]

 v6.0.0

 Baseline

 As at baseline


isbn13(data)

takes an ISBN-10 format code as the quoted string dataStr and returns it in ISBN-13 format. Any dashes or other punctuation will be ignored. If the argument is not a valid ISBN code, the function returns an empty string. If such characters as in the source string and quotes are omitted, hyphen may be mis-parsed as minus signs giving a wrong result.

Consider a book with the ISBN-10 '1472268997' and the ISBN-13 '978-1472268990':

$MyString = isbn13("1472268997") gives the correct '9781472268990' but note, without any hyphens.

be aware that if dataStr is not in quotes, result is the same.