zoukankan      html  css  js  c++  java
  • 字符串

    
    

    输入。

    ·gets(str)  →char

      从光标读取到换行符,包括空格。

      不过我用Xcode跑编译会出现迷之错误:warning: this program uses gets(), which is unsafe.

    ·getline(cin,str)  →string

      从光标读取到换行符,包括空格。

    处理函数。

      strlen(a) 返回长度

      strlwr(a) 大写转小写(+=32)

      strupr(a) 小写转大写 (-=32)

      strcmp(a,b) 比较大小。

        如果a>b,返回一个正整数。

        如果a=b,返回0;

        如果a<b,返回一个负整数。

    作者:tyqEmptySet
  • 相关阅读:
    cf 785#
    hdu 4920 Matrix multiplication
    poj 2443 Set Operation
    bzoj 3687: 简单题
    洛谷 三月月赛 C
    洛谷 三月月赛 B
    洛谷 三月月赛 A
    bzoj 3156: 防御准备
    bzoj 3437: 小P的牧场
    bzoj 3675: [Apio2014]序列分割
  • 原文地址:https://www.cnblogs.com/tyqEmptySet/p/10663044.html
Copyright © 2011-2022 走看看