⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tst_strchr.c

📁 这是《Keil Cx51 V7.0单片机高级语言编程与uVision2应用实践》教材各章中列出的全部程序例子。
💻 C
字号:
#include <string.h>
#include <stdio.h>                  /* for printf */
void tst_strchr (void) {
   char * s;
   char buf [] = "This is a test";
   s = strchr (buf, 't');
   if (s != NULL)
      printf ("found a 't' at %s\n", s);
}

   void tst_strpos (void) {
   char text [] = "Search this string for blanks";
   int i;
   i = strpos (text, ' ');
   if (i == -1)
      printf ("No spaces found in %s\n", text);
   else
      printf ("Found a space at offset %d\n", i);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -