JSID_IS_STRING 编辑
Testing and conversion functions between a JS ID and a JS string.
Syntax
bool
JSID_IS_STRING(jsid id);
JSString *
JSID_TO_STRING(jsid id);
jsid
INTERNED_STRING_TO_JSID(JSContext *cx, JSString *str); // Added in SpiderMonkey 38
JSFlatString *
JSID_TO_FLAT_STRING(jsid id); // Added in SpiderMonkey 17
Name | Type | Description |
---|---|---|
cx | JSContext * | Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext . |
id | jsid | The property identifier to test or convert. |
str | JSString * | An interned string to convert to an id. |
Description
JSID_IS_STRING
tests whether a specified JS ID, id
, is a string, and returns true
if it's a string.
JSID_TO_STRING
converts a specified JS ID, id
to a JSString *
.
INTERNED_STRING_TO_JSID
converts a specified interned string, str
to a jsid
.
JSID_TO_FLAT_STRING
converts a specified JS ID, id
to a JSFlatString *
.
See Also
- MXR ID Search for
JSID_IS_STRING
- MXR ID Search for
JSID_TO_STRING
- MXR ID Search for
INTERNED_STRING_TO_JSID
- MXR ID Search for
JSID_TO_FLAT_STRING
- bug 609440 - added
JSID_TO_FLAT_STRING
- bug 1045900 - added
INTERNED_STRING_TO_JSID
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论