摘要:
1. substr() 方法使用 string substr (size_t pos = 0, size_t len = npos) const;pos: 截取初始位置(从头开始截取pos=0)len: 截取字符长度 1 // using substr 2 string fullName = "Sh 阅读全文
摘要:
1. 使用string()构造函数方法 1 //method 1: the constructor of string() 2 char c = 'F'; 3 string s = string(1, c); 4 cout << s ; 2. 使用stringstream字符流 1 //method 阅读全文
摘要:
1.Description: 2.Example: Input: 12345 Output: one five 3.solutions: C Version: 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 5 i 阅读全文