正在加载图片...
串的基本操作 1)StrAssign(&T, chars) strcpy 2)StrCopy(&T,s strc 3)StrEmpty (s strlen(S==0 4)StrCompare(S,T) strcmp 5)StrEngth(s) rIen 6)Concat(&T, Sl, S2)strcat 7)Substring(&Sub, S, Pos, len)0<=pos<=Strlength(S)- 0<=len<=Strlength(S)-pos strncpy 8)Index(S, T, pos )0<=pos<=Strlength(S)-1strstr 9)Replace(&s,T,V 10)StrInsert(&s, pos, T)0<=pos<=Strlength(s 11)StrDelete(&s, pos,len)0<=pos<-StrLength(S)-len 12)Destroy String(&s) 最小操作子集 StrAssign、 StrCompare、 Strength、 Concat, Substring ypb@ustc.edu.cn 3 中国科学技术大学ypb@ustc.edu.cn 3 中国科学技术大学 • 串的基本操作 1)StrAssign(&T,chars) strcpy 2) StrCopy(&T,S) strcpy 3) StrEmpty(S) strlen(S)==0 4) StrCompare(S,T) strcmp 5) StrLength(S) strlen 6) Concat(&T,S1,S2) strcat 7) Substring(&Sub,S,Pos,len) 0<=pos<=Strlength(S)-1 0<=len<=Strlength(S)-pos strncpy 8) Index(S,T,pos) 0<=pos<=Strlength(S)-1 strstr 9) Replace(&S,T,V) 10) StrInsert(&S,pos,T) 0<=pos<=Strlength(S) 11) StrDelete(&S,pos,len) 0<=pos<=StrLength(S)-len 12) DestroyString(&S) • 最小操作子集 StrAssign、StrCompare、StrLength、Concat,Substring
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有