This is Unofficial EPICS BASE Doxygen Site
ntutils.cpp
Go to the documentation of this file.
1 /* ntutils.cpp */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
6 
7 #define epicsExportSharedSymbols
8 #include <pv/ntutils.h>
9 
10 using namespace std;
11 
12 namespace epics { namespace nt {
13 
14 bool NTUtils::is_a(const std::string &u1, const std::string &u2)
15 {
16  // remove minor for the u1
17  size_t pos1 = u1.find_last_of('.');
18  std::string su1 = (pos1 == string::npos) ? u1 : u1.substr(0, pos1);
19 
20  // remove minor for the u2
21  size_t pos2 = u2.find_last_of('.');
22  std::string su2 = (pos2 == string::npos) ? u2 : u2.substr(0, pos2);
23 
24  return su2 == su1;
25 }
26 
27 }}
Definition: memory.hpp:41
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16