/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali
{
-
/**
* return true if the lower cased ASCII strings are equal.
*/
return c;
}
-size_t TreeNode::Count(const std::string& childName) const
+size_t TreeNode::Count(std::string_view childName) const
{
const TreeNode* c = GetChild(childName);
if(c)
}
}
-const TreeNode* TreeNode::GetChild(const std::string& childName) const
+const TreeNode* TreeNode::GetChild(std::string_view childName) const
{
const TreeNode* p = mFirstChild;
while(p)
{
- if(p->mName && (std::string(p->mName) == childName))
+ if(p->mName && (std::string_view(p->mName) == childName))
{
return p;
}
return NULL;
}
-const TreeNode* TreeNode::GetChildIgnoreCase(const std::string& childName) const
+const TreeNode* TreeNode::GetChildIgnoreCase(std::string_view childName) const
{
const TreeNode* p = mFirstChild;
while(p)
return NULL;
}
-const TreeNode* TreeNode::Find(const std::string& childName) const
+const TreeNode* TreeNode::Find(std::string_view childName) const
{
- if(mName && std::string(mName) == childName)
+ if(mName && std::string_view(mName) == childName)
{
return this;
}