• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/obsolete/

Lines Matching +defs:string +defs:match

40 ;; function string-to-float converts from string to floating point
42 ;; function float-to-string converts from floating point to string
85 "Regular expression to match floating point numbers. Extract matches:
148 (defun extract-match (str i) ; used after string-match
150 (substring str (match-beginning i) (match-end i))
288 (defun int-to-hex-string (int)
289 "Convert the integer argument to a C-style hexadecimal string."
294 (setq str (concat str (char-to-string
325 (defun float-to-string (fnum &optional sci)
326 "Convert the floating point number to a decimal string.
356 (setq str (int-to-string int))
362 "E" (int-to-string power)))
364 ; regular decimal string
391 ;; string to float conversion.
394 (defun string-to-float (str)
395 "Convert the string to a floating point number.
396 Accepts a decimal string in scientific notation, with exponent preceded
402 (if (string-match floating-point-regexp str 0)
406 (let* ((int-subst (extract-match str 2))
407 (fract-subst (extract-match str 4))
408 (digit-string (concat int-subst fract-subst))
409 (mant-sign (equal (extract-match str 1) "-"))
414 (while (and (< leading-0s (length digit-string))
415 (= (aref digit-string leading-0s) ?0))
418 digit-string (substring digit-string leading-0s))
421 (if (> (length digit-string) decimal-digits)
422 (setq round-up (>= (aref digit-string decimal-digits) ?5)
423 digit-string (substring digit-string 0 decimal-digits))
424 (setq power (+ power (- decimal-digits (length digit-string)))))
427 (f (* (+ (string-to-number digit-string)
432 (let* ((expt-subst (extract-match str 9))
433 (expt-sign (equal (extract-match str 8) "-"))
437 (setq expt (+ (* (string-to-number