Home > database >  How do I read in turn multiline text box inside information
How do I read in turn multiline text box inside information

Time:10-14

Text box the text inside me according to the specified format used in line with the separated, and each record is a newline,
Excuse me, how to read the text box, and can judge me each other after a row, reading is to the next line of data again?

CodePudding user response:

/*
Function name: string handling
Founder: years beacon
Create time: 2016/12/15
*/

Int I, j, k, m, ls_01, ls_02=0
String jj []

J=1
M=1
//refer to the following code, all of your content into str_100, "/" into your delimiter, jj [1] is the first line, jj [2] is the second line, and so on
The do while j & lt;=., str_i + 1
If j & lt;=., str_i then
K=pos (str_100, "/", m)
Jj [j]=mid (str_100, m, k - m)
The else
K=len (str_100)
Jj [j]=mid (str_100, m, k - m + 1)
End the if
M=k + 1
J=j + 1
Loop

Ls_01=1
The do while ls_01 & lt;=upperbound (jj)
If jj [ls_01]=str_01 then
Ls_02=ls_02 + 1
End the if
Ls_01=ls_01 + 1
Loop

If ls_02=0 then
Return false
The else
Return true
end if

CodePudding user response:

The text box of the data according to enter a newline, split into an array of strings, and then processing is more convenient for

Or directly into a data window, and then through the data window line to deal with
  • Related