1樓:帳號已登出
如果你確係是要在漢字與其後的悶顫字母間換行敏者,我的**螞拿敗沒問題。
private sub command1_click()
fn = freefile
open "c:\" for output as #fn
print #fn, splt("abbba楞地要ssss工工地ffff工工工aaa縫縫補補")
close #fn
end sub
public function splt(str as string) as string
j = 1splt =
for i = 1 to len(str)
if i + 1 > len(str) then
splt = splt & mid(str, j, i - j + 1)
elseif asc(mid(str, i, 1)) 0 and asc(mid(str, i + 1, 1)) 0 then
j = i + 1
end if
end if
end function
vb 怎樣從文字檔案中讀取指定字串
2樓:網友
文字檔案讀取很簡單。
不過,你已經指定了,還要讀取什麼呢?
可能你的描述不清楚,用 instr()函式可以判斷乙個字串裡是否含有指定的字串aa="sdvxgdg dgd fd alarm fgd fhfgh"
if instr(aa,"alarm")>0 then msgbox"存在這個字串"
vb如何按日期讀取文字檔案內的字串
3樓:棘棘芽
寫了幾個函式,可以完成的所有的功能。下有** .並有例子。
4樓:淡月殘緣_董蒙
dim fo as object , f as dateset fo = createobject("")
f= "c:\")
這個方法可以獲取到檔案的建立日期,其他的我無能為力了。
5樓:網友
文字檔名的命名規律呢?
用vb實現文字檔案中部分字元儲存到新文字檔案
6樓:網友
方法很簡單,在要插入的字串中,查詢廳正做[平面座標及精度]即可,用instr函式即可,找到位置後,取(查詢到的位置+查詢字清備串的長度)為起點的字串即可,用mid函式扮衡即可。
VB去除字串中的空格,VB 如何去掉一個字串中的空格
類似 dim a as string a a b 然後你可以呼叫a.trim 就是去掉空格。重新發一次 這樣,可去除空格 private sub command1 click dim a as string,b as stringa 1234 5678 for i 1 to len a if mid...
vb中陣列array如何轉化成字串
用str 函式,比如 來str 2 就是把整數型資料 自2轉化成字元型別的 2 要轉化陣列,直接將括號裡的內容改為陣列就可以了,比如定義的一維陣列m 5 那麼就是str m x x 0,1,2 5.用join函式,比如 dim arr s arr array 1,2,3,4,5 s join arr...
VB中在文字中輸入一段字串,怎麼分別提取出各個字元給陣列
option explicit dim a as string dim n as integer private sub command1 click redim a len text1.text for n 1 to len text1.text a n mid text1.text,n,1 pr...