Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2f41eba1
Commit
2f41eba1
authored
Mar 05, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/Path: reimplement GetSuffix() using GetBase() and StringFindLast()
parent
91a6fb81
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Path.cxx
src/fs/Path.cxx
+7
-1
No files found.
src/fs/Path.cxx
View file @
2f41eba1
...
...
@@ -21,6 +21,7 @@
#include "Path.hxx"
#include "Charset.hxx"
#include "util/UriUtil.hxx"
#include "util/StringUtil.hxx"
std
::
string
Path
::
ToUTF8
()
const
...
...
@@ -31,5 +32,10 @@ Path::ToUTF8() const
Path
::
const_pointer
Path
::
GetSuffix
()
const
{
return
uri_get_suffix
(
c_str
());
const
auto
base
=
GetBase
().
c_str
();
const
auto
*
dot
=
StringFindLast
(
base
,
'.'
);
if
(
dot
==
nullptr
||
dot
==
base
)
return
nullptr
;
return
dot
+
1
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment