Guidance
指路人
g.yi.org
software / RapidQ / RQ Doc / html / qstringlist.html

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Appendix A: QSTRINGLIST
Rapid-Q Documentation by William Yu (c)1999 Appendix A: QSTRINGLIST


QSTRINGLIST Component

QStringList is a component to store and manipulate a list of strings.

QStringList Properties
FieldTypeR/WDefaultSupport





DuplicatesINTEGERRWdupIgnoreW
ItemARRAY of STRINGRWWXG
ItemCountINTEGERRWXG
SortedINTEGERRWFalseW
TextSTRINGRWWXG

QStringList Methods
MethodTypeDescriptionParamsSupport





AddItemsSUBIAdd strings to stringlistSTRINGs, InfiniteWXG
AddListSUB (List AS QStringList)Append another stringlist1WXG
BuildFUNCTION Build(Start%, End%, Delim$) AS STRINGReturns a deliminated string3WXG
ClearSUBClears entire stringlist0WXG
DelItemsSUBIDelete strings by their indexIndex #s, InfiniteWXG
ExchangeSUB (Index1%, Index2%)Swap strings at Index1% with Index2%2WXG
IndexOfFUNCTION IndexOf%(String$)Return Index number of string1WXG
InsertItemSUB (Index%, String$)Insert string at Index%2WXG
LoadFromFileSUB (File$)Load text file in stringlist1WXG
LoadFromStreamSUB (File AS QStream)Load file/memorystream in stringlist1W
ParseFUNCTION Parse(Source$, Delim$) AS LONGSeparates strings by the Delim$ and stores each item in the list2WXG
SaveToFileSUB (File$)Saves stringlist to file1WXG
SaveToStreamSUB (File AS QStream)Load file/memorystream in stringlist1W
SortSUBSort the stringlist0WXG

QStringList Events
EventTypeOccurs when...Params






QStringList Examples
  DIM StringList1 AS QStringList
  DIM StringList2 AS QStringList

  StringList1.AddItems "Oranges","Apples"
  StringList2.AddItems "Byte","Word","Integer"
  StringList1.AddList(StringList2)
  StringList1.Sort

  ?StringList1.Text
  ?StringList1.Item(3)
  ?StringList1.IndexOf("Word")
  ?StringList1.IndexOf("hi")

  '-------------------------------------------------------

  DIM StringList AS QSTRINGLIST

  StringList.Parse("James:Brown:555-3454:House",":")

  PRINT StringList.Build(0,StringList.ItemCount-1,",")

Prev Component Contents Next Component
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2017-11-22  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:48