String library.
Dependents: CheckSum RN41 RealTimeClock TVZ_MU_Seminar ... more
Diff: StrLib.h
- Revision:
- 2:14f3ff21096e
- Parent:
- 1:7c89cd414311
- Child:
- 3:ad74ab63f78c
--- a/StrLib.h Mon Jun 29 01:51:12 2015 +0000 +++ b/StrLib.h Wed Sep 02 04:15:48 2015 +0000 @@ -5,22 +5,35 @@ /** String(Ascii) -> long(int) - * @param string target(str), int Base(8Oct, 10Dec, 16Hex) + * @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(8Oct, 10Dec, 16Hex), int Number of digit + * @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); -string toAlpanumeric(string str, bool large=false); \ No newline at end of file +// EOF \ No newline at end of file