use more string_view
Change-Id: I8be5ab687c2fe039e0a48d505b615f7cb88b633d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
c898611bd5
commit
496ad6ad02
@@ -92,14 +92,14 @@ static uno::Reference< XLinguServiceManager2 > GetLngSvcMgr_Impl()
|
||||
return xRes;
|
||||
}
|
||||
|
||||
static bool getTag(std::string_view rLine, const char *pTagName,
|
||||
static bool getTag(std::string_view rLine, std::string_view rTagName,
|
||||
OString &rTagValue)
|
||||
{
|
||||
size_t nPos = rLine.find(pTagName);
|
||||
size_t nPos = rLine.find(rTagName);
|
||||
if (nPos == std::string_view::npos)
|
||||
return false;
|
||||
|
||||
rTagValue = comphelper::string::strip(rLine.substr(nPos + strlen(pTagName)),
|
||||
rTagValue = comphelper::string::strip(rLine.substr(nPos + rTagName.size()),
|
||||
' ');
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user