正在加载图片...
串的抽象数据类型 数据对象为字符集的线性表 ADT String i 数据对象:D={a1|a1 Characteset,i=1,2 数据关系:R={<a1,a1>1a1D,i=2,…n} 基本操作: StrAssign(&T, chars); StrCopy(&T, s); StrEmpty(S); StrCompare(s, T) StrEngth(s) ClearString(&s); Concat(&T, S1, S2); Substring(&Sub, S, pos,len); Index(s,T, pos); Replace(&s,T, v) StrInsert(&S, pos,T); StrDelete(&S, pos, len) DestroyString(&s) JADT String串 的 抽 象 数 据 类 型 --- 数据对象为字符集的线性表 ADT String { 数据对象:D = {ai | ai CharacteSet,i=1,2,...n, n>=0} 数据关系: R1 = {< ai-1. , aj>| ai D, i=2,...n}。 基本操作: • StrAssign(&T,chars); StrCopy(&T,S); • StrEmpty (S); StrCompare(S,T); • StrLength(S); ClearString(&S); • Concat(&T,S1,S2); Substring(&Sub,S,pos,len); • Index(S,T,pos); Replace(&S,T,V); • StrInsert(&S,pos,T); StrDelete(&S,pos,len); • DestroyString(&S) }ADT String
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有