diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-08-10 16:15:11 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-08-10 16:15:11 -0400 |
commit | e6c087fb6c631d5acf16536356ebe5a72967c9b0 (patch) | |
tree | 69dc3215baa3330c76c016419f12f8498dbf3b05 /lib/token.cpp | |
parent | 494e19b3c27e6a1eb63b39c245ad4024702e883b (diff) | |
download | verbly-e6c087fb6c631d5acf16536356ebe5a72967c9b0.tar.gz verbly-e6c087fb6c631d5acf16536356ebe5a72967c9b0.tar.bz2 verbly-e6c087fb6c631d5acf16536356ebe5a72967c9b0.zip |
Replaced some split/implode uses with hkutil
Diffstat (limited to 'lib/token.cpp')
-rw-r--r-- | lib/token.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/token.cpp b/lib/token.cpp index 945be5e..7b1d1fa 100644 --- a/lib/token.cpp +++ b/lib/token.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | #include "token.h" | 1 | #include "token.h" |
2 | #include <stdexcept> | 2 | #include <stdexcept> |
3 | #include <algorithm> | 3 | #include <algorithm> |
4 | #include "util.h" | 4 | #include <hkutil/string.h> |
5 | 5 | ||
6 | namespace verbly { | 6 | namespace verbly { |
7 | 7 | ||
@@ -359,7 +359,7 @@ namespace verbly { | |||
359 | } else if (capitalization == casing::title_case) | 359 | } else if (capitalization == casing::title_case) |
360 | { | 360 | { |
361 | std::list<std::string> swords = | 361 | std::list<std::string> swords = |
362 | split<std::list<std::string>>(result, " "); | 362 | hatkirby::split<std::list<std::string>>(result, " "); |
363 | 363 | ||
364 | for (std::string& sword : swords) | 364 | for (std::string& sword : swords) |
365 | { | 365 | { |
@@ -369,7 +369,7 @@ namespace verbly { | |||
369 | } | 369 | } |
370 | } | 370 | } |
371 | 371 | ||
372 | result = implode(std::begin(swords), std::end(swords), " "); | 372 | result = hatkirby::implode(std::begin(swords), std::end(swords), " "); |
373 | } else if (capitalization == casing::all_caps) | 373 | } else if (capitalization == casing::all_caps) |
374 | { | 374 | { |
375 | for (char& ch : result) | 375 | for (char& ch : result) |
@@ -410,7 +410,7 @@ namespace verbly { | |||
410 | } else if (capitalization == casing::title_case) | 410 | } else if (capitalization == casing::title_case) |
411 | { | 411 | { |
412 | std::list<std::string> swords = | 412 | std::list<std::string> swords = |
413 | split<std::list<std::string>>(result, " "); | 413 | hatkirby::split<std::list<std::string>>(result, " "); |
414 | 414 | ||
415 | for (std::string& sword : swords) | 415 | for (std::string& sword : swords) |
416 | { | 416 | { |
@@ -420,7 +420,7 @@ namespace verbly { | |||
420 | } | 420 | } |
421 | } | 421 | } |
422 | 422 | ||
423 | result = implode(std::begin(swords), std::end(swords), " "); | 423 | result = hatkirby::implode(std::begin(swords), std::end(swords), " "); |
424 | } else if (capitalization == casing::all_caps) | 424 | } else if (capitalization == casing::all_caps) |
425 | { | 425 | { |
426 | for (char& ch : result) | 426 | for (char& ch : result) |
@@ -458,7 +458,7 @@ namespace verbly { | |||
458 | first = false; | 458 | first = false; |
459 | } | 459 | } |
460 | 460 | ||
461 | return implode(std::begin(compiled), std::end(compiled), separator); | 461 | return hatkirby::implode(std::begin(compiled), std::end(compiled), separator); |
462 | } | 462 | } |
463 | 463 | ||
464 | case type::transform: | 464 | case type::transform: |