Function operator==

Summary

#include <include/flecs/addons/cpp/utils/string.hpp>

(1) bool operator==(const flecs::string &str) const

(2) bool operator==(const char *str) const

Function overload

Synopsis

#include <include/flecs/addons/cpp/utils/string.hpp>

bool operator==(const flecs::string &str) const

Description

No description yet.

Source

Lines 56-70 in include/flecs/addons/cpp/utils/string.hpp.

bool operator==(const flecs::string& str) const {
    if (str.m_const_str == m_const_str) {
        return true;
    }
    if (!m_const_str || !str.m_const_str) {
        return false;
    }
    if (str.m_length != m_length) {
        return false;
    }
    return ecs_os_strcmp(str, m_const_str) == 0;
}

Synopsis

#include <include/flecs/addons/cpp/utils/string.hpp>

bool operator==(const char *str) const

Description

No description yet.

Source

Lines 76-86 in include/flecs/addons/cpp/utils/string.hpp.

bool operator==(const char *str) const {
    if (m_const_str == str) {
        return true;
    }
    if (!m_const_str || !str) {
        return false;
    }
    return ecs_os_strcmp(str, m_const_str) == 0;
}