Hey #schemers !
I have two numbers in strings with comma as decimal separator (e.g. "0,46" and "0,098")

Any idea how I can get their sum in simpler way than this :
(use-modules (ice-9 string-fun))
(+ (string->number (string-replace-substring "0,24" "," ".")) (string->number (string-replace-substring "0,098" "," ".")))

Feels heavy…

Thx!

#guile #scheme

@jeko Try ‘locale-string->inexact’ from (ice-9 i18n) in a French locale:

(locale-string->inexact "3,14" (make-locale LC_ALL "fr_FR.utf8"))
⇒ 3.14

@civodul Oh my! I've tried (locale-string->inexact "3,14" (make-locale LC_ALL "fr_FR")) and it did not work because I missed the .utf8 haha
Thank you Ludo' !