This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

isbn10(dataStr)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Data manipulation  [other Data manipulation operators]

 Baseline

 As at baseline


isbn10(dataStr)

takes quoted an ISBN-13 format code as the dataStr input and returns is in ISBN-10 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 = isbn10("978-1472268990") gives the correct '1472268997' but note, without any hyphens.

be aware that if dataStr is not in quotes, the input is treated as an arithmetical expression:

$MyString = isbn10("978-1472268990") gives the incorrect value '1472268012'.