diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-23 10:00:41 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-23 10:00:41 +0200 |
commit | 633c15570a52082030667ec2d096058f16ccf228 (patch) | |
tree | 674de11ffa2ee17e36e226e698a327ec55aa1481 /indra/llui/llurlregistry.cpp | |
parent | 4d9762eb846ae1894f0c31eecb6230803018e730 (diff) | |
parent | 0a98034641267ea57360fdd369acb8b94ff9bc20 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rw-r--r-- | indra/llui/llurlregistry.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index afcff0d409..ad5c0911f8 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -223,3 +223,23 @@ bool LLUrlRegistry::hasUrl(const LLWString &text) LLUrlMatch match; return findUrl(text, match); } + +bool LLUrlRegistry::isUrl(const std::string &text) +{ + LLUrlMatch match; + if (findUrl(text, match)) + { + return (match.getStart() == 0 && match.getEnd() >= text.size()-1); + } + return false; +} + +bool LLUrlRegistry::isUrl(const LLWString &text) +{ + LLUrlMatch match; + if (findUrl(text, match)) + { + return (match.getStart() == 0 && match.getEnd() >= text.size()-1); + } + return false; +} |