fs/Traits.hxx: add GetLengthFS()
There is no GetLengthUTF8() because strlen or std::string::size() could be used instead.
This commit is contained in:
parent
6c5828822c
commit
3a183f869f
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,6 +80,11 @@ struct PathTraits {
|
|||||||
return IsSeparatorUTF8(*p);
|
return IsSeparatorUTF8(*p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gcc_pure
|
||||||
|
static size_t GetLengthFS(const_pointer p) {
|
||||||
|
return strlen(p);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the "base" file name of the given UTF-8 path.
|
* Determine the "base" file name of the given UTF-8 path.
|
||||||
* The return value points inside the given string.
|
* The return value points inside the given string.
|
||||||
|
Loading…
Reference in New Issue
Block a user