Moves source and headers
src/nt/*.h => src/pv/*.h src/nt/*.cpp => src/*.cpp test/nt/*.* => test/*.*
This commit is contained in:
28
src/ntutils.cpp
Normal file
28
src/ntutils.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/* ntutils.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* This software is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
*/
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include <pv/ntutils.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace epics { namespace nt {
|
||||
|
||||
bool NTUtils::is_a(const std::string &u1, const std::string &u2)
|
||||
{
|
||||
// remove minor for the u1
|
||||
size_t pos1 = u1.find_last_of('.');
|
||||
std::string su1 = (pos1 == string::npos) ? u1 : u1.substr(0, pos1);
|
||||
|
||||
// remove minor for the u2
|
||||
size_t pos2 = u2.find_last_of('.');
|
||||
std::string su2 = (pos2 == string::npos) ? u2 : u2.substr(0, pos2);
|
||||
|
||||
return su2 == su1;
|
||||
}
|
||||
|
||||
}}
|
||||
Reference in New Issue
Block a user