String library.

Dependents:   CheckSum RN41 RealTimeClock TVZ_MU_Seminar ... more

Committer:
AkinoriHashimoto
Date:
Thu Jun 11 01:50:08 2015 +0000
Revision:
0:058192932ad2
Child:
1:7c89cd414311
string library.; I2A, A2I, compare.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AkinoriHashimoto 0:058192932ad2 1 #pragma once
AkinoriHashimoto 0:058192932ad2 2
AkinoriHashimoto 0:058192932ad2 3 #include "mbed.h"
AkinoriHashimoto 0:058192932ad2 4 #include <string>
AkinoriHashimoto 0:058192932ad2 5 // class化しないとダメなんだけど。。。
AkinoriHashimoto 0:058192932ad2 6
AkinoriHashimoto 0:058192932ad2 7 /** String -> long
AkinoriHashimoto 0:058192932ad2 8 * @param string target(str), int Base(8Oct, 10Dec, 16Hex)
AkinoriHashimoto 0:058192932ad2 9 * @return long int
AkinoriHashimoto 0:058192932ad2 10 */
AkinoriHashimoto 0:058192932ad2 11 long A2I(string, int); // Ascii → Intへ変換する関数。
AkinoriHashimoto 0:058192932ad2 12
AkinoriHashimoto 0:058192932ad2 13 /** int -> string
AkinoriHashimoto 0:058192932ad2 14 * @param int target(num), int Base(8Oct, 10Dec, 16Hex), int Number of digit
AkinoriHashimoto 0:058192932ad2 15 * @return string str
AkinoriHashimoto 0:058192932ad2 16 */
AkinoriHashimoto 0:058192932ad2 17 string I2A(int num, int base= 10, int digitNum= 0); // 標準引数
AkinoriHashimoto 0:058192932ad2 18
AkinoriHashimoto 0:058192932ad2 19 /** string Compare
AkinoriHashimoto 0:058192932ad2 20 * @param string target, string cmp, int index in target
AkinoriHashimoto 0:058192932ad2 21 * @return bool
AkinoriHashimoto 0:058192932ad2 22 */
AkinoriHashimoto 0:058192932ad2 23 bool strCompare(string trg, string cmp, int idx); // trg内にcmpが存在する位置がidxか判定。