xxtelebot
1.4.1.0
A simple Telegram Bot implementation in C++
Main Page
Namespaces
Classes
Files
File List
include
tgbot
utils
get_filename.h
1
#ifndef TGBOT_UTILS_GETFILENAME_H
2
#define TGBOT_UTILS_GETFILENAME_H
3
4
#include <string>
5
6
namespace
tgbot
{
7
namespace
utils {
8
9
inline
std::string getFileName(
const
std::string &s) {
10
std::size_t size = s.size();
11
std::size_t i = s.rfind(
'/'
, size);
12
13
if
(i != std::string::npos)
return
s.substr(i + 1, size - i);
14
15
return
""
;
16
}
17
18
}
// namespace utils
19
}
// namespace tgbot
20
21
#endif
tgbot
Main tgbot namespace.
Definition:
bot.h:13
Generated by
1.8.11