gpt4 book ai didi

string - 用空格分割字符串

转载 作者:行者123 更新时间:2023-12-02 06:40:12 26 4
gpt4 key购买 nike

我有一个字符串,其中有两个单词:

Cat Dog

我怎样才能将它们分开,以便我得到:

Str1 = CatStr2 = Dog

请注意,这是针对 VB6 的。

最佳答案

使用Split function .

Dim output() As String
output = Split("Cat Dog", " ")

会产生

output(0) = Cat
output(1) = Dog

关于string - 用空格分割字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27975042/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com