A library for talking to Multi-Tech's Cellular SocketModem Devices.

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MTSText.h Source File

MTSText.h

00001 /* Universal Socket Modem Interface Library
00002 * Copyright (c) 2013 Multi-Tech Systems
00003 *
00004 * Licensed under the Apache License, Version 2.0 (the "License");
00005 * you may not use this file except in compliance with the License.
00006 * You may obtain a copy of the License at
00007 *
00008 *     http://www.apache.org/licenses/LICENSE-2.0
00009 *
00010 * Unless required by applicable law or agreed to in writing, software
00011 * distributed under the License is distributed on an "AS IS" BASIS,
00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013 * See the License for the specific language governing permissions and
00014 * limitations under the License.
00015 */
00016 
00017 #ifndef MTSTEXT_H_
00018 #define MTSTEXT_H_
00019 
00020 #include <string>
00021 #include <vector>
00022 #include <stddef.h>
00023 
00024 namespace mts
00025 {
00026 
00027 class Text
00028 {
00029 
00030 public:
00031     /**
00032     *
00033     * @param source
00034     * @param start
00035     * @param cursor
00036     */
00037     static std::string getLine(const std::string& source, const size_t& start, size_t& cursor);
00038 
00039     /**
00040     *
00041     * @param str
00042     * @param delimiter
00043     * @param limit
00044     */
00045     static std::vector<std::string> split(const std::string& str, char delimiter, int limit = 0);
00046 
00047     /**
00048     *
00049     * @param str
00050     * @param delimiter
00051     * @param limit
00052     */
00053     static std::vector<std::string> split(const std::string& str, const std::string& delimiter, int limit = 0);
00054 
00055 private:
00056     Text();
00057     Text(const Text& other);
00058     Text& operator=(const Text& other);
00059 };
00060 
00061 }
00062 #endif
00063