1
無法解釋這一點,爲什麼這是分裂3部分而不是2?vb.net string.split分裂3次而不是2
myRichTextboxEx.Rtf = "{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1043\deflangfe1043\deftab708{\fonttbl{\f0\fnil\fcharset0 Segoe UI;}{\f1\fswiss\fprq2\fcharset0 Verdana;}{\f2\fmodern\fprq1\fcharset0 Lucida Console;}{\f3\froman\fprq2\fcharset0 Times New Roman;}} {\colortbl ;\red0\green0\blue255;} {\*\generator Riched20 6.3.9600}\viewkind4\uc1 \pard\nowidctlpar\sl276\slmult1\tx1276\tx2130\tx3124\f0\fs18 \f1\fs36\par \pard\nowidctlpar\sl276\slmult1\tx3000\f2\fs17 Eemplein 20\line 3812 EA Amersfoort\line {{\field{\*\fldinst{HYPERLINK www.kingoftheribs.nl }}{\fldrslt{www.kingoftheribs.nl\ul0\cf0}}}}\f2\fs17\line 033-8887088\par \pard\nowidctlpar\sl276\slmult1\qc\tx3000\par \pard\nowidctlpar\sl276\slmult1\tx3000\line B.J. van Logtestijn\line Prins Frederiklaan 57C \line 3818KB \line Amersfoort\line T1:06=41191965 T2: T3:\line\b \par \fs30 Bon #1\line\b0\fs18\line\line\line 1 x Durum Chicken\tab 3,95 \line\line 1 x Turkse pizza (lamacun)\tab 1,95 \line\li
ne 1 x Turkse pizza sla en saus\tab 2,50 \line \i Groot ben&Jerry's (3,5)\i0\line\line 1 x Gegra. aardappel\tab 3,00 \line\line 1 x Kapsalon menu kebab Medium\tab 5,95 \line\line 1 x Drumsticks Menu 3st\tab 5,95 \line\line 1 x Kinder Menu Ribs\tab 3,75 \line\par Totaal:\tab 30,55\line Korting:\tab 0,00\line\fs20 Te voldoen:\fs18\tab 30,55\par Betaald met:\tab <BEDRAGBETAALDMET>\par Wisselgeld:\tab -30,55\par \b\fs24\line\b0\fs18 Btw 6,00 % over 30,55:\tab 1,73 \b\fs24\line\b0\fs18 Btw 21,00 % over 0,00:\tab 0,00\par \par Aflevertijd: \par \fs17 Betaalwijze:\b\fs24 Contant\b0\fs17 \par \par \f1 29-10-2013 29-10-2013 16:47:50\par \f2 \fs24\par \pard\nowidctlpar\sl276\slmult1\qc\tx3000\fs22 Bedankt voor uw bestelling\par en eet smakelijk!!!\f1\lang19\par \pard\nowidctlpar\sl276\slmult1\tx3000\par <CUTHERE>-----------------------------------\par \b\f2\fs30\lang1043 Ordernummer 1\par \pard\nowidctl
par\sa200\sl276\slmult1\b0\f3\fs22 --------------------------------------------------\par } "
Dim SplitRTFmessage As String() = myRichTextboxEx.Rtf.Split("<CUTHERE>")
謝謝先生,我用了很多次的拆分功能,但從來不知道我通過一個字符而不是一個字符串.. – Rui
@Rui歡迎您。有時候,VB可能在這方面有點混亂。 – varocarbas