Search completed in 1.20 seconds.
NS_StringContainerFinish
Return Values This function does not return a value. Example Code See NS_StringContainerInit for an example. ...
... Return Values This function does not return a value. Example Code See NS_StringContainerInit for an example. ...
... Return Values This function does not return a value. Example Code See NS_StringContainerInit for an example. ...
Index
counting. This is done using the functions AddRef() and Release(), which respectively modify a variable of type nsAutoRefCnt, which basically is a wrapper around a count of the number of references refering to the class. 1223 nsString Class Declaration 1224 nsString external NeedsContent, Reference, Reference(2), strings Class Declaration 1225
nsStringContainer (External) NeedsContent, Reference, Reference(2), strings Class Declaration 1226 nsSupportsWeakReference XPCOM, XPCOM API Reference Inherit from this C++ class to add canonical support for nsISupportsWeakReference. 1227 nsXPIDLCString Class Declaration 1228 nsXPIDLString Class Declaration 1229 XPCOM primitive ...
...existing value of a nsAString instance. This is a low-level API. 1245 NS_StringCloneData XPCOM, XPCOM API Reference The NS_StringCloneData function returns a null-terminated, heap allocated copy of the string's internal buffer. 1246 NS_StringContainerFinish XPCOM, XPCOM API Reference The NS_StringContainerFinish function releases any memory allocated by a
nsStringContainer instance. This is a low-level API. 1247 NS_StringContainerInit XPCOM, XPCOM API Reference The NS_StringContainerInit function initializes a
nsStringContainer instance for use as a nsAString. This is a low-level API. 1248 NS_StringCopy XPCOM, XPCOM API Reference The NS_StringCopy function copies the value from one nsAString instance to another. This is a l...
nsAString (External)
Class Declaration This header provides wrapper classes around the frozen string API which are roughly equivalent to the internal string classes. ...
...r classes around the frozen string API which are roughly equivalent to the internal string classes. ...
NS_StringContainerInit
<< XPCOM API Reference Summary The NS_StringContainerInit function initializes a
nsStringContainer instance for use as a nsAString. This is a low-level API. #include "nsStringAPI.h" nsresult NS_StringContainerInit(
nsStringContainer& aString ); Parameters aString [in] A
nsStringContainer instance to be initialized. Return Values The NS_StringContainerInit function returns NS_OK if successful. Otherwise, it returns an error code. Remarks The
nsStringContainer structure has unspecified size and layout. Its members may not be accessed directly. After a
nsStringContainer object has been initialized, it may be used as an ordinary nsAString object. The internal buffer allocated by a
nsStringContainer is always null-terminated. With NS_StringContainerInit, the coder is required to ca...
...emarks The
nsStringContainer structure has unspecified size and layout. Its members may not be accessed directly. After a
nsStringContainer object has been initialized, it may be used as an ordinary nsAString object. The internal buffer allocated by a
nsStringContainer is always null-terminated. With NS_StringContainerInit, the coder is required to call NS_StringContainerFinish when done with the
nsStringContainer object. Therefore, it is generally better to use nsEmbedString, to instantiate a nsAString object, since it automatically releases allocated memory when the object goes out of scope. Example Code
nsStringContainer str; if (NS_SUCCEEDED(NS_StringContainerInit(str))) { // Now, |str| can be used with any function taking a nsAString parameter. // Be sure to call this function to releas...
Debugging on Windows
mRawPtr,x> nsAutoPtr=<mRawPtr,x> After you have made the changes and saved the file, you will need to restart Visual C++ for the changes to take effect. For XPCOM Strings (the "external" string API) you can use the following values: ;; Mozilla (1.9) ; Internal Strings nsAString_internal=<mData,su>, length=<mLength,u> nsACString_internal=<mData,s>, length=<mLength,u> ; XPCOM Strings nsAString=<
nsStringContainer.v,su>, length=<
nsStringContainer.d1,u> nsACString=<nsCStringContainer.v,s>, length=<nsCStringContainer.d1,u>
nsStringContainer=<v,su>, length=<d1,u> nsCStringContainer=<v,s>, length=<d1,u> There is a more extensive version of this file in progress in AutoExpForVC8. Avoiding stepping into certain functions You can avoid stepping into certain functions, such as nsCOMPtr methods, using an undocu...
PromiseFlatString (External)
Methods get PRUnichar* get() const - source operator= nsString_external& operator=(const nsString_external&) - source Parameters nsString_external& aString nsAString& operator=(const nsAString&) - source Parameters nsAString& aString nsAString& opera...
nsAutoString (External)
Methods get PRUnichar* get() const - source operator= nsString_external& operator=(const nsString_external&) - source Parameters nsString_external& aString nsAString& operator=(const nsAString&) - source Parameters nsAString& aString nsAString& opera...
nsDependentSubstring external
Methods Constructors void nsDependentSubstring_external() - source void nsDependentSubstring_external(const PRUnichar*, PRUint32) - source Parameters PRUnichar aStart PRUint32 aLength void nsDependentSubstring_external(const nsAString&, PRUint32) - source Parameters nsAStri...
nsString external
Methods Constructors void nsString_external() - source void nsString_external(const nsString_external&) - source Parameters nsString_external& aString void nsString_external(const nsAString&) - source Parameters nsAString& aReadable void nsString_external(const ...
XPCOM glue classes
he type be an XPCOM interface. Like with nsCOMPtr, it is the responsibility of the object itself to implement reference counting. ...
NS_StringAppendData
not be null terminated. Return Values The NS_StringAppendData function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is defined inline as a wrapper around NS_StringSetDataRange Note: GCC requires the -fshort-wchar option to compile this example since PRUnichar is an unsigned short. This example should compile by default under MSVC. Example Code
nsStringContainer str; NS_StringContainerInit(str); NS_StringSetData(str, L"hello"); NS_StringAppendData(str, L" world"); const PRUnichar* data; NS_StringGetData(str, &data); // data now points to the string: L"hello world" NS_StringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringSetDataRange, nsAString ...
NS_StringCutData
to the end of the string. Return Values The NS_StringCutData function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is defined inline as a wrapper around NS_StringSetDataRange. Note: GCC requires the -fshort-wchar option to compile this example since PRUnichar is an unsigned short. This example should compile by default under MSVC. Example Code
nsStringContainer str; NS_StringContainerInit(str); NS_StringSetData(str, L"hello world"); // remove " world" portion of string NS_StringCutData(str, 5, PR_UINT32_MAX); const PRUnichar* data; NS_StringGetData(str, &data); // data now ponts to the string: L"hello" NS_StringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringSe...
NS_StringInsertData
t be null terminated. Return Values The NS_StringInsertData function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is defined inline as a wrapper around NS_StringSetDataRange . Note: GCC requires the -fshort-wchar option to compile this example since PRUnichar is an unsigned short. This example should compile by default under MSVC. Example Code
nsStringContainer str; NS_StringContainerInit(str); NS_StringSetData(str, L"hello"); NS_StringInsertData(str, 5, L" world"); const PRUnichar* data; NS_StringGetData(str, &data); // data now points to the string: L"hello world" NS_StringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_StringSetDataRange , nsACString ...
NS_StringSetData
sAString instance to modify. aData [in] A raw character array to copy into this string. aDataLength [in] The length of aData, measured in storage units. If equal to PR_UINT32_MAX, then aData is assumed to be null-terminated. Otherwise, aData need not be null terminated. Return Values The NS_StringSetData function returns NS_OK if successful. Otherwise, it returns an error code. Example Code
nsStringContainer str; rv = NS_StringContainerInit(str); if (NS_SUCCEEDED(rv)) { rv = NS_StringSetData(str, "hello world"); if (NS_SUCCEEDED(rv)) { // now, pass |str| to some function expecting a |const nsAString&| parameter. } NS_StringContainerFinish(str); } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also nsAString ...
XPCOM string functions
e result in a nsAString instance. NS_StringAppendDataThe NS_StringAppendData function appends data to the existing value of a nsAString instance. This is a low-level API.NS_StringCloneDataThe NS_StringCloneData function returns a null-terminated, heap allocated copy of the string's internal buffer.NS_StringContainerFinishThe NS_StringContainerFinish function releases any memory allocated by a
nsStringContainer instance. This is a low-level API.NS_StringContainerInitThe NS_StringContainerInit function initializes a
nsStringContainer instance for use as a nsAString. This is a low-level API.NS_StringCopyThe NS_StringCopy function copies the value from one nsAString instance to another. This is a low-level API.NS_StringCutDataThe NS_StringCutData function removes a section of the string's internal buffer. ...