Function: ntlm-unicode2ascii

ntlm-unicode2ascii is a byte-compiled function defined in ntlm.el.gz.

Signature

(ntlm-unicode2ascii STR LEN)

Documentation

Extract 7 bits ASCII part of a little endian utf16 string STR of length LEN.

Source Code

;; Defined in /usr/src/emacs/lisp/net/ntlm.el.gz
(defun ntlm-unicode2ascii (str len)
  "Extract 7 bits ASCII part of a little endian utf16 string STR of length LEN."
  (let ((buf (make-string len 0)) (i 0) (j 0))
    (while (< i len)
      (aset buf i (logand (aref str j) 127)) ;(string-to-number "7f" 16)
      (setq i (1+ i)
	    j (+ 2 j)))
    buf))