MCPcopy Create free account
hub / github.com/bensema/gotdx / CleanCode

Function CleanCode

types/util.go:197–207  ·  view source on GitHub ↗
(code string)

Source from the content-addressed store, hash-verified

195}
196
197func CleanCode(code string) string {
198 if code == "" {
199 return ""
200 }
201 // 寻找 '.' 的位置,如果存在则只取 '.' 之前的部分
202 if idx := strings.Index(code, "."); idx != -1 {
203 return code[:idx]
204 }
205 // 如果没有点号,直接返回
206 return code
207}
208
209func isSHETF(code string) bool {
210 if len(code) != 6 {

Callers 8

DecodeStockCodeFunction · 0.85
StockPrefixFunction · 0.85
IndexPrefixFunction · 0.85
isSHStockFunction · 0.85
isSZStockFunction · 0.85
isBJStockFunction · 0.85
isHKStockFunction · 0.85
isUSAStockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…