View Single Post
Old 04-17-2023, 12:06 PM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by hlhp View Post
how can i combine the following to a string? can not find reference in doc, or i missing it.

Code:
program: floor(field('#floatx') / 333) + "books"
Assuming you want '+' to be string concatenation:
  • In the manual under General Program Mode
    Quote:
    String concatenation (&). The & operator returns a string formed by concatenating the left-hand and right-hand expressions. Example: 'aaa' & 'bbb' returns 'aaabbb'. The operator is associative and evaluates left to right.
  • In the manual under "Additional Functions Available":
    Quote:
    strcat(a [, b]*) – can take any number of arguments. Returns a string formed by concatenating all the arguments.
  • In the String manipulation section of the Function reference manual:
    strcat(a, b):
    Quote:
    class calibre.utils.formatter_functions.BuiltinStrcat[source]
    strcat(a [, b]*) – can take any number of arguments. Returns the string formed by concatenating all the arguments
chaley is offline   Reply With Quote