~aleteoryx/muditaos

ref: 4bbdb1d3b0d16b8d00f70786539cbfc18220aab7 muditaos/module-apps/application-desktop/data/Mmi.hpp -rw-r--r-- 502 bytes
4bbdb1d3 — Pawel Paprocki [EGD-4465] Create info window for incoming MMI messages (#1078) 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

namespace mmi
{
    static inline std::string removePhrase(std::string str, std::string phrase)
    {
        auto find_pos = str.find(phrase);
        while (find_pos != std::string::npos) {
            str.replace(find_pos, phrase.size(), "");
            find_pos = str.find(phrase, find_pos);
        }
        return str;
    }
} // namespace mmi