Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


« XPCOM API Reference


The get function returns a const pointer to the string's null-terminated, internal buffer.

 const char_type* get() const;

Example Code

  void GetBar(nsAString &result);

  void Func()
    nsEmbedString str;

    const PRUnichar *data = str.get();

Document Tags and Contributors

 Contributors to this page: Sheppy, Pmash
 Last updated by: Sheppy,