Function: helpful--convert-c-name
helpful--convert-c-name is a byte-compiled function defined in
helpful.el.
Signature
(helpful--convert-c-name SYMBOL VAR)
Documentation
Convert SYMBOL from a C name to an Elisp name.
E.g. convert Fmake_string to make-string or
Vgc_cons_percentage to gc-cons-percentage. Interpret
SYMBOL as variable name if VAR, else a function name. Return
nil if SYMBOL doesn't begin with "F" or "V".
Source Code
;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
(defun helpful--convert-c-name (symbol var)
"Convert SYMBOL from a C name to an Elisp name.
E.g. convert `Fmake_string' to `make-string' or
`Vgc_cons_percentage' to `gc-cons-percentage'. Interpret
SYMBOL as variable name if VAR, else a function name. Return
nil if SYMBOL doesn't begin with \"F\" or \"V\"."
(let ((string (symbol-name symbol))
(prefix (if var "V" "F")))
(when (s-starts-with-p prefix string)
(intern
(s-chop-prefix
prefix
(s-replace "_" "-" string))))))