Fix non-null terminated string
This commit is contained in:
committed by
Raphael Coeffic
parent
073d20cd7c
commit
655e20a774
@@ -24,7 +24,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include "str_functions.h"
|
#include "str_functions.h"
|
||||||
|
|
||||||
static char splitChars[] = { ' ', '-', '\t' };
|
static const char splitChars[] = { " -\t" };
|
||||||
|
|
||||||
void removeAllWhiteSpace(char *str)
|
void removeAllWhiteSpace(char *str)
|
||||||
{
|
{
|
||||||
@@ -67,7 +67,7 @@ std::string trim_start(std::string str)
|
|||||||
return str.substr(i);
|
return str.substr(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> Explode(std::string str, char *splitChars)
|
std::vector<std::string> Explode(std::string str, const char *splitChars)
|
||||||
{
|
{
|
||||||
std::vector<std::string> parts;
|
std::vector<std::string> parts;
|
||||||
int startIndex = 0;
|
int startIndex = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user