| 1 | #ifndef _Strings_extensions_h_ |
| 2 | #define _Strings_extensions_h_ |
| 3 | /* Strings_extensions.h |
| 4 | * |
| 5 | * Copyright (C) 1993-2022 David Weenink |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | djmw 20010114 |
| 23 | djmw 20020813 GPL header |
| 24 | djmw 20040629 Strings_append now accepts an Ordered of Strings. |
| 25 | djmw 20050714 Permutations |
| 26 | djmw 20050724 Index |
| 27 | djmw 20120813 Latest modification |
| 28 | */ |
| 29 | |
| 30 | #include "Collection.h" |
| 31 | #include "Index.h" |
| 32 | #include "Strings_.h" |
| 33 | #include "Permutation.h" |
| 34 | #include "Index.h" |
| 35 | #include "Table.h" |
| 36 | |
| 37 | autoStrings Strings_createFixedLength (integer numberOfStrings); |
| 38 | |
| 39 | autoStrings Strings_createAsCharacters (conststring32 string); |
| 40 | |
| 41 | autoStrings Strings_createAsTokens (conststring32 string, conststring32 separators); |
| 42 | |
| 43 | autoStrings Strings_append (OrderedOf<structStrings>* me); |
| 44 | |
| 45 | autoStrings Strings_change (Strings me, conststring32 search, conststring32 replace, |
| 46 | int maximumNumberOfReplaces, integer *nmatches, integer *nstringmatches, bool use_regexp); |
| 47 | |
| 48 | autoStrings Strings_createFromSTRVEC (constSTRVEC const& strings); |
| 49 | |
| 50 | autoStrings Strings_extractPart (Strings me, integer start, integer end); |
| 51 | |
| 52 | autoStringsIndex Strings_to_StringsIndex (Strings me, kStrings_sorting sorting); |
| 53 | |
| 54 | autoStringsIndex Stringses_to_StringsIndex (Strings me, Strings classes); |
| 55 | /* Construct the index with strings in classes, index [i] = 0 when my strings [i] doesn't occur in classes */ |
| 56 | |
| 57 | autoStringsIndex Table_to_StringsIndex_column (Table me, integer column, kStrings_sorting sorting); |
| 58 | |
| 59 | autoStrings StringsIndex_to_Strings (StringsIndex me); |
| 60 | |
| 61 | autoPermutation Strings_to_Permutation (Strings me, kStrings_sorting sort); |
| 62 | |
| 63 | autoStrings Strings_Permutation_permuteStrings (Strings me, Permutation thee); |
| 64 | |
| 65 | #endif /* _Strings_extensions_h_ */ |