All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 2 Objective-C Reference

ns-string-to-string Function

Summary

Converts an Objective-C NSString to a Lisp string.

Package

objc

Signature

ns-string-to-string ns-string &optional preserve-line-terminators => string

Arguments
ns-string
A pointer to an Objective-C foreign object of type NSString.
preserve-line-terminators
A generalized boolean.
Values
string
A string.
Description

The function ns-string-to-string returns a Lisp string containing the characters in ns-string.

If preserve-line-terminators is nil (the default), then character code 13 is ignored after character code 10 and other occurrences of character code 13 are converted to #Newline. This allows lines to be terminated by LF, CR or CRLF. Otherwise, character code 13 is converted to #Return.

Notes

ns-string-to-string was defined in previous versions of LispWorks but was not documented until LispWorks 8.1.

See also

string-to-ns-string


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 18 Feb 2025 15:39:48