mozilla
Your Search Results

    Assign

    « XPCOM API Reference

    Summary

    The Assign family of functions sets the value of a string's internal buffer.

     void Assign(
       const self_type& aString
     );
    

    Parameters

    aString
    [in] A nsAString to copy into this string.
     void Assign(
       const char_type* aData,
       size_type aDataLength = PR_UINT32_MAX
     );
    

    Parameters

    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.
     void Assign(
       char_type aChar
     );
    

    Parameters

    aChar
    [in] The character to copy into this string.

    Remarks

    If insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer.

    Document Tags and Contributors

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