本文整理汇总了C++中StringIsEqual函数的典型用法代码示例。如果您正苦于以下问题:C++ StringIsEqual函数的具体用法?C++ StringIsEqual怎么用?C++ StringIsEqual使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了StringIsEqual函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindLanguage
gcc_pure
static const BuiltinLanguage *
FindLanguage(const TCHAR *resource)
{
assert(resource != NULL);
// Search for supported languages matching the MO file name
for (unsigned i = 0; language_table[i].resource != NULL; ++i)
if (StringIsEqual(language_table[i].resource, resource))
// .. and return the language code
return &language_table[i];
return nullptr;
}
示例2: ParsePFLAE
void
ParsePFLAE(NMEAInputLine &line, FlarmError &error, double clock)
{
char type[2];
line.Read(type, ARRAY_SIZE(type));
if (!StringIsEqual(type, "A"))
return;
error.severity = (FlarmError::Severity)
line.Read((int)FlarmError::Severity::NO_ERROR);
error.code = (FlarmError::Code)line.ReadHex(0);
error.available.Update(clock);
}
示例3: StringAfterPrefix
const char *
StringAfterPrefix(const char *string, const char *prefix)
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert(string != nullptr);
assert(prefix != nullptr);
#endif
size_t prefix_length = strlen(prefix);
return StringIsEqual(string, prefix, prefix_length)
? string + prefix_length
: nullptr;
}
示例4: line
bool
PGDevice::ParseNMEA(const char *String, NMEAInfo &info)
{
NMEAInputLine line(String);
char type[16];
line.Read(type, 16);
// $GPWIN ... Winpilot proprietary sentance includinh baro altitude
// $GPWIN ,01900 , 0 , 5159 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 * 6 B , 0 7 * 6 0 E
if (StringIsEqual(type, "$GPWIN"))
return GPWIN(line, info);
else
return LXDevice::ParseNMEA(String, info);
}
示例5: ParseKeyCode
unsigned
ParseKeyCode(const TCHAR *data)
{
for (const struct string_to_key *p = &string_to_key[0]; p->name != NULL; ++p)
if (StringIsEqual(data, p->name))
return p->key;
if (StringLength(data) == 1)
return ToUpperASCII(data[0]);
else
return 0;
}
示例6: if
void
InputEvents::eventSounds(const TCHAR *misc)
{
SoundSettings &settings = CommonInterface::SetUISettings().sound;
// bool OldEnableSoundVario = EnableSoundVario;
if (StringIsEqual(misc, _T("toggle")))
settings.vario.enabled = !settings.vario.enabled;
else if (StringIsEqual(misc, _T("on")))
settings.vario.enabled = true;
else if (StringIsEqual(misc, _T("off")))
settings.vario.enabled = false;
else if (StringIsEqual(misc, _T("show"))) {
if (settings.vario.enabled)
Message::AddMessage(_("Vario sounds on"));
else
Message::AddMessage(_("Vario sounds off"));
return;
}
AudioVarioGlue::Configure(settings.vario);
Profile::Set(ProfileKeys::SoundAudioVario, settings.vario.enabled);
}
示例7: l_airspace_index
static int
l_airspace_index(lua_State *L)
{
const char *name = lua_tostring(L, 2);
if (name == nullptr)
return 0;
else if (StringIsEqual(name, "nearest_vertical_distance")) {
NearestAirspace nearest = NearestAirspace::FindVertical(CommonInterface::Basic(),
CommonInterface::Calculated(),
glide_computer->GetAirspaceWarnings(),
airspace_database);
if (!nearest.IsDefined()) return 0;
Lua::Push(L, nearest.distance);
} else if (StringIsEqual(name, "nearest_vertical_name")) {
NearestAirspace nearest = NearestAirspace::FindVertical(CommonInterface::Basic(),
CommonInterface::Calculated(),
glide_computer->GetAirspaceWarnings(),
airspace_database);
if (!nearest.IsDefined()) return 0;
Lua::Push(L, nearest.airspace->GetName());
} else if (StringIsEqual(name, "nearest_horizontal_distance")) {
NearestAirspace nearest = NearestAirspace::FindHorizontal(CommonInterface::Basic(),
glide_computer->GetAirspaceWarnings(),
airspace_database);
if (!nearest.IsDefined()) return 0;
Lua::Push(L, nearest.distance);
} else if (StringIsEqual(name, "nearest_horizontal_name")) {
NearestAirspace nearest = NearestAirspace::FindHorizontal(CommonInterface::Basic(),
glide_computer->GetAirspaceWarnings(),
airspace_database);
if (!nearest.IsDefined()) return 0;
Lua::Push(L, nearest.airspace->GetName());
} else
return 0;
return 1;
}
示例8: line
bool
VolksloggerDevice::ParseNMEA(const char *String, NMEAInfo &info)
{
if (!VerifyNMEAChecksum(String))
return false;
NMEAInputLine line(String);
char type[16];
line.Read(type, 16);
if (StringIsEqual(type, "$PGCS"))
return vl_PGCS1(line, info);
else
return false;
}
示例9: CallBackLookup
static void *
CallBackLookup(const CallBackTableEntry *lookup_table, const TCHAR *name)
{
assert(name != NULL);
assert(!StringIsEmpty(name));
assert(lookup_table != NULL);
for (const CallBackTableEntry *p = lookup_table;; ++p) {
assert(p->name != NULL);
assert(p->callback != NULL);
if (StringIsEqual(p->name, name))
return p->callback;
}
}
示例10: IsWidcommDevice
bool
IsWidcommDevice(const TCHAR *name)
{
TCHAR key[64];
if (!FindDevice(name, key, 64))
return false;
RegistryKey registry(HKEY_LOCAL_MACHINE, key, true);
if (registry.error())
return false;
TCHAR dll[64];
return registry.GetValue(_T("Dll"), dll, 64) &&
StringIsEqual(dll, _T("btcedrivers.dll"));
}
示例11: line
bool
FlymasterF1Device::ParseNMEA(const char *String, NMEAInfo &info)
{
if (!VerifyNMEAChecksum(String))
return false;
NMEAInputLine line(String);
char type[16];
line.Read(type, 16);
if (StringIsEqual(type, "$VARIO"))
return VARIO(line, info);
else
return false;
}
示例12: _T
void
Profile::Load(const ProfileMap &map, LiveTrack24Settings &settings)
{
map.Get(ProfileKeys::LiveTrack24Enabled, settings.enabled);
if (!map.Get(ProfileKeys::LiveTrack24Server, settings.server))
settings.server = _T("www.livetrack24.com");
else if (StringIsEqual(settings.server, _T("livexc.dhv1.de"))) {
// DHV tracking server moved to new host (#3208)
settings.server = _T("livexc.dhv.de");
}
map.Get(ProfileKeys::LiveTrack24Username, settings.username);
map.Get(ProfileKeys::LiveTrack24Password, settings.password);
}
示例13: line
bool
CondorDevice::ParseNMEA(const char *String, NMEAInfo &info)
{
if (!VerifyNMEAChecksum(String))
return false;
NMEAInputLine line(String);
char type[16];
line.Read(type, 16);
if (StringIsEqual(type, "$LXWP0"))
return cLXWP0(line, info);
return false;
}
示例14: line
bool
GTAltimeterDevice::ParseNMEA(const char *_line, NMEAInfo &info)
{
if (!VerifyNMEAChecksum(_line))
return false;
NMEAInputLine line(_line);
char type[16];
line.Read(type, 16);
if (StringIsEqual(type, "$LK8EX1"))
return LK8EX1(line, info);
return false;
}
示例15:
bool
DeviceDescriptor::IsManageable() const
{
if (driver != nullptr) {
if (driver->IsManageable())
return true;
if (StringIsEqual(driver->name, _T("LX")) && device != nullptr) {
const LXDevice &lx = *(const LXDevice *)device;
return lx.IsV7() || lx.IsNano() || lx.IsLX16xx();
}
}
return false;
}