{
// trim whitespaces
CStdString strTest = strCondition;
- strTest.TrimLeft(" \t\r\n");
- strTest.TrimRight(" \t\r\n");
+ StringUtils::Trim(strTest);
vector< Property> info;
SplitInfoString(strTest, info);
break;
case WEATHER_CONDITIONS:
strLabel = g_weatherManager.GetInfo(WEATHER_LABEL_CURRENT_COND);
- strLabel = strLabel.Trim();
+ StringUtils::Trim(strLabel);
break;
case WEATHER_TEMPERATURE:
strLabel = StringUtils::Format("%s%s",
unsigned int CGUIInfoManager::Register(const CStdString &expression, int context)
{
CStdString condition(CGUIInfoLabel::ReplaceLocalize(expression));
- condition.TrimLeft(" \t\r\n");
- condition.TrimRight(" \t\r\n");
+ StringUtils::Trim(condition);
if (condition.empty())
return 0;
if (info==LISTITEM_FILE_EXTENSION)
{
CStdString strExtension = URIUtils::GetExtension(strFile);
- return strExtension.TrimLeft(".");
+ return StringUtils::TrimLeft(strExtension, ".");
}
return strFile;
}