Mercurial > octave
comparison liboctave/str-vec.cc @ 8671:d7128ae51e44
undo changeset 4238f2600a17
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Feb 2009 15:53:24 -0500 |
parents | 4238f2600a17 |
children | e2b4c19c455c |
comparison
equal
deleted
inserted
replaced
8670:6f5b2835325c | 8671:d7128ae51e44 |
---|---|
81 { | 81 { |
82 for (octave_idx_type i = 0; i < n; i++) | 82 for (octave_idx_type i = 0; i < n; i++) |
83 elem (i) = s[i]; | 83 elem (i) = s[i]; |
84 } | 84 } |
85 | 85 |
86 string_vector& | |
87 string_vector::sort (bool make_uniq) | |
88 { | |
89 // Don't use Array<std::string>::sort () to allow sorting in place. | |
90 octave_sort<std::string> lsort; | |
91 lsort.sort (Array<std::string>::fortran_vec (), length ()); | |
92 | |
93 if (make_uniq) | |
94 uniq (); | |
95 | |
96 return *this; | |
97 } | |
98 string_vector& | 86 string_vector& |
99 string_vector::uniq (void) | 87 string_vector::uniq (void) |
100 { | 88 { |
101 octave_idx_type len = length (); | 89 octave_idx_type len = length (); |
102 | 90 |