diff options
author | skolb <none@none> | 2009-12-21 09:31:48 -0800 |
---|---|---|
committer | skolb <none@none> | 2009-12-21 09:31:48 -0800 |
commit | ec8738ac4501fd2158ca2ebeb146239f98dcd971 (patch) | |
tree | c63d3222fbb5f8036b012c60e8622cd085fbe60d /indra/llui/llurlregistry.cpp | |
parent | b910de4ad7f91bb2022bfb8304c3dea32c0a4857 (diff) | |
parent | d894c7a0d8292ce2114e88f382dcf6187b0d2535 (diff) |
Merge viewer 2-0 into media
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; +} |