String library.
Dependents: CheckSum RN41 RealTimeClock TVZ_MU_Seminar ... more
StrLib.h
- Committer:
- AkinoriHashimoto
- Date:
- 2015-09-02
- Revision:
- 3:ad74ab63f78c
- Parent:
- 2:14f3ff21096e
- Child:
- 4:17e03f0747d9
File content as of revision 3:ad74ab63f78c:
#pragma once #include "mbed.h" #include <string> /** String(Ascii) -> long(int) * * @param string target(str), int Base(8:Oct, 10:Dec, 16:Hex) * @return long int */ long A2I(string, int); /** int -> string * * @param int target(num), int Base(8:Oct, 10:Dec, 16:Hex), int Number of digit * @return string str */ string I2A(int num, int base= 10, int digitNum= 0); /** float -> string * * Overload; Output format. * @param float target(num), int Field-width, int Number of decimal-places. * @return string. */ string F2A(float num, int fieldWidth, int decimalPlaces); string F2A(float num); /** string Compare * * @param string target, string cmp, int index in target * @return bool */ bool strCompare(string trg, string cmp, int idx); // trg内にcmpが存在する位置がidxか判定。 /** Eraze others Alphameric, and convert lower-cases to capitals. * * @param string target, bool to-capitals. * @return string */ string toAlpanumeric(string str, bool large=false); // EOF