Strings_extensions.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef _Strings_extensions_h_
  2. #define _Strings_extensions_h_
  3. /* Strings_extensions.h
  4. *
  5. * Copyright (C) 1993-2017 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. djmw 20010114
  22. djmw 20020813 GPL header
  23. djmw 20040629 Strings_append now accepts an Ordered of Strings.
  24. djmw 20050714 Permutations
  25. djmw 20050724 Index
  26. djmw 20120813 Latest modification
  27. */
  28. #include "Collection.h"
  29. #include "Strings_.h"
  30. #include "Permutation.h"
  31. #include "Index.h"
  32. #include "Table.h"
  33. autoStrings Strings_createFixedLength (integer numberOfStrings);
  34. autoStrings Strings_createAsCharacters (conststring32 string);
  35. autoStrings Strings_createAsTokens (conststring32 string, conststring32 separators);
  36. integer Strings_findString (Strings me, conststring32 string);
  37. autoStrings Strings_append (OrderedOf<structStrings>* me);
  38. autoStrings Strings_change (Strings me, conststring32 search, conststring32 replace,
  39. int maximumNumberOfReplaces, integer *nmatches, integer *nstringmatches, bool use_regexp);
  40. autoStrings strings_to_Strings (char32 **strings, integer from, integer to);
  41. autoStrings Strings_extractPart (Strings me, integer start, integer end);
  42. autoStringsIndex Strings_to_StringsIndex (Strings me);
  43. autoStringsIndex Stringses_to_StringsIndex (Strings me, Strings classes);
  44. /* Construct the index with strings in classes, index[i]=0 when my strings[i] doesn't occur in classes */
  45. autoStringsIndex Table_to_StringsIndex_column (Table me, integer column);
  46. autoStrings StringsIndex_to_Strings (StringsIndex me);
  47. autoPermutation Strings_to_Permutation (Strings me, int sort);
  48. autoStrings Strings_Permutation_permuteStrings (Strings me, Permutation thee);
  49. #endif /* _Strings_extensions_h_ */