]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/nonascii.texi
New function ‘char-from-name’
[gnu-emacs] / doc / lispref / nonascii.texi
index 0e4aa86e48b60b52166cff60bbac7da2ad376df2..fd2ce3248fd53ae7e76dd2f7e20cd34687beb54e 100644 (file)
@@ -420,6 +420,18 @@ codepoint can have.
 @end example
 @end defun
 
+@defun char-from-name string &optional ignore-case
+This function returns the character whose Unicode name is @var{string}.
+If @var{ignore-case} is non-@code{nil}, case is ignored in @var{string}.
+This function returns @code{nil} if @var{string} does not name a character.
+
+@example
+;; U+03A3
+(= (char-from-name "GREEK CAPITAL LETTER SIGMA") #x03A3)
+     @result{} t
+@end example
+@end defun
+
 @defun get-byte &optional pos string
 This function returns the byte at character position @var{pos} in the
 current buffer.  If the current buffer is unibyte, this is literally