【问题标题】:Real Studio: How do I get the index of a substring?Real Studio:如何获取子字符串的索引?
【发布时间】:2011-12-09 13:38:22
【问题描述】:

如何使用 Real Studio 从字符串中获取子字符串的索引?

比如我想在下面的例子中获取World的索引

Dim str As String = "Hello World"

【问题讨论】:

    标签: realbasic


    【解决方案1】:

    http://docs.realsoftware.com/index.php/Instr中的Instr()方法

    Dim pos As Integer
    pos = str.InStr("World")
    

    【讨论】:

      猜你喜欢
      • 2011-11-21
      • 1970-01-01
      • 1970-01-01
      • 2019-07-22
      • 2015-06-30
      • 1970-01-01
      • 2023-03-11
      • 2020-06-17
      • 2010-11-17
      相关资源
      最近更新 更多