[問題] 從字串中的第5個位元開始抓字串
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Linux GCC
問題(Question):
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char **argv)
{
char *line = "abc dddd efg hhhhhhhhhh";
/* 從第五個位元開始抓6個位元
也就是抓出來的結果想要是
"dddd e"
目前找C的字串處理函式找不太到
不知道怎麼抓出來 感謝大大的指導
*/
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.117.164.19
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1473662739.A.D38.html
→
09/12 14:59, , 1F
09/12 14:59, 1F
→
09/12 14:59, , 2F
09/12 14:59, 2F
→
09/12 15:04, , 3F
09/12 15:04, 3F
推
09/12 15:08, , 4F
09/12 15:08, 4F
→
09/12 16:43, , 5F
09/12 16:43, 5F
推
09/12 20:09, , 6F
09/12 20:09, 6F
推
09/12 23:23, , 7F
09/12 23:23, 7F
推
09/13 13:20, , 8F
09/13 13:20, 8F
→
09/13 13:20, , 9F
09/13 13:20, 9F
→
09/13 13:20, , 10F
09/13 13:20, 10F
→
09/13 13:21, , 11F
09/13 13:21, 11F
→
09/13 13:22, , 12F
09/13 13:22, 12F
→
09/13 13:22, , 13F
09/13 13:22, 13F
推
09/15 00:56, , 14F
09/15 00:56, 14F
→
09/15 00:56, , 15F
09/15 00:56, 15F
討論串 (同標題文章)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章
-2
11