textrun.c
来自「LCD module driver」· C语言 代码 · 共 23 行
C
23 行
#include <stdlib.h>#include <string.h>/* * wrap around a string *text by step characters * repeated calls give a "running text" effect */void textrun(char *text, unsigned int step){char *tmp; if (text!=NULL) tmp=(char *)malloc(strlen(text)*sizeof(char)); else return; if (strlen(text)>step) { strcpy(tmp,&text[step]); strncat(tmp,text,step); strcpy(text,tmp); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?