ASP Skip 方法

定义和用法

Skip 方法在读取 TextStream 文件时跳过指定的字符数目。

语法:
  1. TextStreamObject.Skip(numchar)
参数描述
numchar必需的。需要跳过的字符数目。

实例

  1. <%
  2. dim fs,f,t,x
  3. set fs=Server.CreateObject("Scripting.FileSystemObject")
  4. set f=fs.CreateTextFile("c:\test.txt")
  5. f.write("Hello World!")
  6. f.close
  7. set t=fs.OpenTextFile("c:\test.txt",1,false)
  8. t.Skip(7)
  9. x=t.ReadAll
  10. t.close
  11. Response.Write("跳过某些字符后的输出: " & x)
  12. %>

输出:

  1. 跳过某些字符后的输出: orld!

分类导航