Search completed in 1.20 seconds.
18 results for "nscstringcontainer":
Your results are loading. Please wait...
NS_CStringContainerInit2
aData [in] An array of characters used to initialize the string object. This parameter may be null. aDataLength [in] An optional parameter that specifies the length of the array pointed to by aData. ...
... aData [in] An array of characters used to initialize the string object. This parameter may be null. aDataLength [in] An optional parameter that specifies the length of the array pointed to by aData. ...
... aData [in] An array of characters used to initialize the string object. This parameter may be null. aDataLength [in] An optional parameter that specifies the length of the array pointed to by aData. ...
... have allocated the data array using the XPCOM memory allocator. This flag should not be combined with NS_CSTRING_CONTAINER_INIT_DEPEND. NS_CSTRING_CONTAINER_INIT_SUBSTRING Data passed into NS_CStringContainerInit2 is a substring that is not null-terminated. Return Values The NS_CStringContainerInit function returns NS_OK if successful. Otherwise, it returns an error code. Remarks After a nsCStringContainer object has been initialized via NS_CStringContainerInit2, it may be used as an ordinary nsACString object. When the string object is no longer needed, it should be passed to NS_CStringContainerFinish to free any extra memory that the string object may have allocated. It is generally better to use one of the helper classes, such as nsCString, instead of coding directly to NS_CStringContainerInit2 ...
Index
Mozilla › Tech › XPCOM › Index
NeedsContent, Reference, Reference(2), strings Class Declaration 1187 nsCOMPtr XPCOM, XPCOM API Reference This utility class simplifies managing XPCOM interface references from C++ code. 1188 nsCString Class Declaration 1189 nsCString external NeedsContent, Reference, Reference(2), strings Class Declaration 1190 nsCStringContainer (External) Reference, Reference(2), needsattention, strings Class Declaration 1191 nsCStringEncoding XPCOM, XPCOM API Reference The nsCStringEncoding enumeration describes the set of character encodings understood by the NS_CStringToUTF16 and NS_UTF16ToCString functions. 1192 nsCountedRef nsCountedRef<t> is a template class implementing an obje...
...tance. This is a low-level API. 1232 NS_CStringCloneData XPCOM, XPCOM API Reference The NS_CStringCloneData function returns a null-terminated, heap allocated copy of the string's internal buffer. ...
...f the string's internal buffer. 1233 NS_CStringContainerFinish Functions, Functions:Frozen, XPCOM, XPCOM API Reference The NS_CStringContainerFinish function releases any memory allocated by a nsCStringContainer instance. 1234 NS_CStringContainerInit Functions, Functions:Frozen, XPCOM, XPCOM API Reference The NS_CStringContainerInit function initializes a nsCStringContainer instance for use as a nsACString. 1235 NS_CStringContainerInit2 Functions, Functions:Frozen, XPCOM, XPCOM API Reference The NS_CStringContainerInit2 function initializes a nsCStringContainer instance for use as a nsACString. 1236 NS_CStringCopy Functions, Functions:Frozen, XPCOM, XPCOM API Reference The NS_CStringCopy function copies the value from one ns...
NS_CStringContainerFinish
History This function was finalized for Mozilla 1.7. ...
... History This function was finalized for Mozilla 1.7. ...
... History This function was finalized for Mozilla 1.7. ...
NS_CStringContainerInit
<< XPCOM API Reference Summary The NS_CStringContainerInit function initializes a nsCStringContainer instance for use as a nsACString. #include "nsStringAPI.h" nsresult NS_CStringContainerInit( nsCStringContainer& aString ); Parameters aString [in] A nsCStringContainer instance to be initialized. Return Values The NS_CStringContainerInit function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is equivalent to NS_CStringContainerInit2(container, nsnull, 0, 0). The nsCStringContainer structure has private members that should not be accessed directly. After a nsCStringContainer object has been initialized via NS_CStringContainerInit, it may be used as an ordinary nsACString object. With NS_CStringContainerInit, the coder is required to call N...
...on is equivalent to NS_CStringContainerInit2(container, nsnull, 0, 0). The nsCStringContainer structure has private members that should not be accessed directly. After a nsCStringContainer object has been initialized via NS_CStringContainerInit, it may be used as an ordinary nsACString object. With NS_CStringContainerInit, the coder is required to call NS_CStringContainerFinish when done with the nsCStringContainer object. Therefore, it is generally better to use nsEmbedCString, to instantiate a nsACString object, since it automatically releases allocated memory when the object goes out of scope. Example nsCStringContainer str; if (NS_SUCCEEDED(NS_CStringContainerInit(str))) { // Now, |str| can be used with any function taking a nsACString parameter. // Call this function to release any memory owned...
Debugging on Windows
d 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 undocumented feature of VC. See the blog post How to Not Step Into Functions...
PromiseFlatCString (External)
Methods get char* get() const - source operator= nsCString_external& operator=(const nsCString_external&) - source Parameters nsCString_external& aString nsACString& operator=(const nsACString&) - source Parameters nsACString& aString nsACString& ope...
nsACString (External)
Class Declaration <map id="classes" name="classes"><area alt="" coords="1005,6,1096,54" href="http://developer.mozilla.org/en/nsACString_(External)" shape="rect" title="nsACString_(External)"> <area alt="" coords="980,102,1121,150" href="http://developer.mozilla.org/en/nsCStringContainer_(External)" shape="rect" title="nsCStringContainer_(External)"> <area alt="" coords="571,198,707,246" href="http://developer.mozilla.org/en/nsCString_external" shape="rect" title="nsCString_external"> <area alt="" coords="731,198,955,246" href="http://developer.mozilla.org/en/nsDependentCSubstring_external" shape="rect" title="nsDependentCSubstring_external"> <area alt="" coords="979,198,1123,246" href="http://developer.mozilla.org/en/PromiseFlatCString_(External)" shape="rect" title="PromiseFlatCString_(External)">...
nsCAutoString (External)
Methods get char* get() const - source operator= nsCString_external& operator=(const nsCString_external&) - source Parameters nsCString_external& aString nsACString& operator=(const nsACString&) - source Parameters nsACString& aString nsACString& ope...
nsCString external
Methods Constructors void nsCString_external() - source void nsCString_external(const nsCString_external&) - source Parameters nsCString_external& aString void nsCString_external(const nsACString&) - source Parameters nsACString& aReadable void nsCString_externa...
nsDependentCSubstring external
Methods Constructors void nsDependentCSubstring_external() - source void nsDependentCSubstring_external(const char*, PRUint32) - source Parameters char* aStart PRUint32 aLength void nsDependentCSubstring_external(const nsACString&, PRUint32) - source Parameters nsACString& ...
XPCOM glue classes
DeclarationnsCAutoString (External)Class DeclarationnsCOMPtrThis utility class simplifies managing XPCOM interface references from C++ code.nsCountedRefnsCountedRef<t> is a template class implementing an object that takes a strong reference to a reference-counted resource that must be released, typically on destruction of the object.</t>nsCStringClass DeclarationnsCString externalClass DeclarationnsCStringContainer (External)Class Declaration nsCStringEncodingThe nsCStringEncoding enumeration describes the set of character encodings understood by the NS_CStringToUTF16 and NS_UTF16ToCString functions.nsDependentCStringClass DeclarationnsDependentCString externalClass DeclarationnsDependentCSubstringClass DeclarationnsDependentCSubstring externalClass DeclarationnsDependentStringClass DeclarationnsDepende...
NS_CStringAppendData
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_CStringAppendData function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is defined inline as a wrapper around NS_CStringSetDataRange. Example nsCStringContainer str; NS_CStringContainerInit(str); NS_CStringSetData(str, "hello"); NS_CStringAppendData(str, " world"); const char* data; NS_CStringGetData(str, &data); printf("%s\n", data); // prints out "hello world" NS_CStringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringSetDataRange, nsACString ...
NS_CStringCutData
red in storage units. aCutLength [in] The length of the section to remove, measured in storage units. Pass PR_UINT32_MAX to specify the length from aCutStart to the end of the string. Return Values The NS_CStringCutData function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is defined inline as a wrapper around NS_CStringSetDataRange . Example Code nsCStringContainer str; NS_CStringContainerInit(str); NS_CStringSetData(str, "hello world"); // remove " world" portion of string NS_CStringCutData(str, 5, PR_UINT32_MAX); const char* data; NS_CStringGetData(str, &data); printf("%s\n", data); // prints out "hello" NS_CStringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringSet...
NS_CStringGetMutableData
s internal buffer. It returns a pointer to the first element of an array of characters that may be modified in-place. The returned pointer remains valid until the string object is passed to some other string function. This function does not necessarily null-terminate aString's internal buffer after resizing it. That behavior depends on the implementation of aString. If aString is a reference to a nsCStringContainer, then its data will be null-terminated by this function. The caller is not responsible for writing a null-terminator. Example // Convert any uppercase ASCII letters to lowercase void ToLowerCase(nsCString &str) { char *iter; PRUint32 len = NS_CStringGetMutableData(str, PR_UINT32_MAX, &iter); char *end = iter + len; while (iter != end) { char c = *iter; if (c >= 'A' && c <= 'Z') ...
NS_CStringInsertData
DataLength [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_CStringInsertData function returns NS_OK if successful. Otherwise, it returns an error code. Remarks This function is defined inline as a wrapper around NS_CStringSetDataRange. Example Code nsCStringContainer str; NS_CStringContainerInit(str); NS_CStringSetData(str, "hello"); NS_CStringInsertData(str, 5, " world"); const char* data; NS_CStringGetData(str, &data); printf("%s\n", data); // prints out "hello world" NS_CStringContainerFinish(str); History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringSetDataRange, nsACString, nsACString ...
NS_CStringSetData
String 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_CStringSetData function returns NS_OK if successful. Otherwise, it returns an error code. Example nsCStringContainer str; rv = NS_CStringContainerInit(str); if (NS_SUCCEEDED(rv)) { rv = NS_CStringSetData(str, "hello world"); if (NS_SUCCEEDED(rv)) { // now, pass |str| to some function expecting a |const nsACString&| parameter. } NS_CStringContainerFinish(str); } History This function was frozen for Mozilla 1.7. See bug 239123 for details. See Also nsACString ...
XPCOM string functions
ly using these functions. NS_CStringAppendDataThe NS_CStringAppendData function appends data to the existing value of a nsACString instance. This is a low-level API.NS_CStringCloneDataThe NS_CStringCloneData function returns a null-terminated, heap allocated copy of the string's internal buffer.NS_CStringContainerFinishThe NS_CStringContainerFinish function releases any memory allocated by a nsCStringContainer instance.NS_CStringContainerInitThe NS_CStringContainerInit function initializes a nsCStringContainer instance for use as a nsACString.NS_CStringContainerInit2The NS_CStringContainerInit2 function initializes a nsCStringContainer instance for use as a nsACString.NS_CStringCopyThe NS_CStringCopy function copies the value from one nsACString instance to another. This is a low-level API.NS_CStringCu...