1 Star 0 Fork 0

Ursa Major / gocode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
utils.go 373 Bytes
一键复制 编辑 原始数据 按行查看 历史
Matthew Dempsky 提交于 2016-05-17 23:54 . gocode: transparent gb support
package main
import (
"os"
"unicode/utf8"
)
func fileExists(filename string) bool {
_, err := os.Stat(filename)
if err != nil {
return false
}
return true
}
func runeToByteOffset(s []byte, offset_c int) (offset_b int) {
for offset_b = 0; offset_c > 0 && offset_b < len(s); offset_b++ {
if utf8.RuneStart(s[offset_b]) {
offset_c--
}
}
return offset_b
}
1
https://gitee.com/sky1458/gocode.git
git@gitee.com:sky1458/gocode.git
sky1458
gocode
gocode
466551c8e799

搜索帮助