X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc81d32f2bf8c159f3b1bf6ddaf62e6d77720209..c11420034872e991007a53f351fc24e49cc0519e:/docs/latex/wx/arrstrng.tex diff --git a/docs/latex/wx/arrstrng.tex b/docs/latex/wx/arrstrng.tex index ea7fec9540..fc5877f8cb 100644 --- a/docs/latex/wx/arrstrng.tex +++ b/docs/latex/wx/arrstrng.tex @@ -12,7 +12,7 @@ uses its knowledge of internals of wxString class to achieve this). This class is used in the same way as other dynamic \helpref{arrays}{wxarray}, except that no {\it WX\_DEFINE\_ARRAY} declaration is needed for it. When a string is added or inserted in the array, a copy of the string is created, so -the original string may be safely deleted (e.g. if it was a {\it char *} +the original string may be safely deleted (e.g. if it was a {\it wxChar *} pointer the memory it was using can be freed immediately after this). In general, there is no need to worry about string memory deallocation when using this class - it will always free the memory it uses itself. @@ -48,7 +48,11 @@ functions. \wxheading{Include files} - + + +\wxheading{Library} + +\helpref{wxBase}{librarieslist} \wxheading{See also} @@ -60,13 +64,23 @@ functions. \func{}{wxArrayString}{\void} -\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}} +Default constructor. -Default and copy constructors. +\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}} -Note that when an array is assigned to a sorted array, its contents is +Copy constructor. Note that when an array is assigned to a sorted array, its contents is automatically sorted during construction. +\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const char**}{ arr}} + +\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wchar\_t**}{ arr}} + +Constructor from a C string array. Pass a size {\it sz} and array {\it arr}. + +\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wxString*}{ arr}} + +Constructor from a wxString array. Pass a size {\it sz} and array {\it arr}. + \membersection{wxArrayString::\destruct{wxArrayString}}\label{wxarraystringdtor} \func{}{\destruct{wxArrayString}}{} @@ -136,14 +150,6 @@ Clears the array contents and frees memory. See also: \helpref{Empty}{wxarraystringempty} -\membersection{wxArrayString::Count}\label{wxarraystringcount} - -\constfunc{size\_t}{Count}{\void} - -Returns the number of items in the array. This function is deprecated and is -for backwards compatibility only, please use -\helpref{GetCount}{wxarraystringgetcount} instead. - \membersection{wxArrayString::Empty}\label{wxarraystringempty} \func{void}{Empty}{\void} @@ -163,7 +169,7 @@ Returns the number of items in the array. \membersection{wxArrayString::Index}\label{wxarraystringindex} -\func{int}{Index}{\param{const char *}{ sz}, \param{bool}{ bCase = true}, \param{bool}{ bFromEnd = false}} +\func{int}{Index}{\param{const wxString\& }{ sz}, \param{bool}{ bCase = true}, \param{bool}{ bFromEnd = false}} Search the element in the array, starting from the beginning if {\it bFromEnd} is false or from end otherwise. If {\it bCase}, comparison is @@ -173,7 +179,7 @@ This function uses linear search for wxArrayString and binary search for wxSortedArrayString, but it ignores the {\it bCase} and {\it bFromEnd} parameters in the latter case. -Returns index of the first item matched or wxNOT\_FOUND if there is no match. +Returns index of the first item matched or {\tt wxNOT\_FOUND} if there is no match. \membersection{wxArrayString::Insert}\label{wxarraystringinsert} @@ -195,7 +201,7 @@ could break the order of items and, for example, subsequent calls to \membersection{wxArrayString::IsEmpty}\label{wxarraystringisempty} -\func{}{IsEmpty}{} +\func{bool}{IsEmpty}{} Returns true if the array is empty, false otherwise. This function returns the same result as {\it GetCount() == 0} but is probably easier to read. @@ -213,7 +219,7 @@ version. \membersection{wxArrayString::Last}\label{wxarraystringlast} -\func{}{Last}{} +\func{wxString&}{Last}{} Returns the last element of the array. Attempt to access the last element of an empty array will result in assert failure in debug build, however no checks @@ -221,14 +227,16 @@ are done in release mode. \membersection{wxArrayString::Remove}\label{wxarraystringremove} -\func{void}{Remove}{\param{const char *}{ sz}} +\func{void}{Remove}{\param{const wxString\&}{ sz}} Removes the first item matching this value. An assert failure is provoked by an attempt to remove an element which does not exist in debug build. See also: \helpref{Index}{wxarraystringindex} -\func{void}{Remove}{\param{size\_t }{nIndex}, \param{size\_t }{count = $1$}} +\membersection{wxArrayString::RemoveAt}\label{wxarraystringremoveat} + +\func{void}{RemoveAt}{\param{size\_t }{nIndex}, \param{size\_t }{count = $1$}} Removes {\it count} items starting at position {\it nIndex} from the array. @@ -246,7 +254,7 @@ See also: \helpref{Alloc}{wxarraystringalloc}, \helpref{Dynamic array memory man \func{void}{Sort}{\param{bool}{ reverseOrder = false}} Sorts the array in alphabetical order or in reverse alphabetical order if -{\it reverseOrder} is true. +{\it reverseOrder} is true. The sort is case-sensitive. {\bf Warning:} this function should not be used with sorted array because it could break the order of items and, for example, subsequent calls to