写惯了PHP,Golang中类似php的strpos的函数是什么呢?其实和JavaScript类似,函数名为:Index。

搜索字符串示例代码:

package main

import "fmt"import "strings"[......]

阅读全文