需要一个正则
This commit is contained in:
parent
c0c60ce5a7
commit
179cf24fba
2 changed files with 12 additions and 2 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
a.nex
|
||||
test.go
|
12
count.go
12
count.go
|
@ -1,6 +1,8 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type charset struct {
|
||||
Name string
|
||||
|
@ -22,7 +24,7 @@ func fas_sum() []dna {
|
|||
func fas_count(sum_nex []dna) []charset {
|
||||
fas_charset := []charset{}
|
||||
for k, v := range sum_nex {
|
||||
n := v.name
|
||||
n := fas_name(v.name)
|
||||
f := 1
|
||||
if k != 0 {
|
||||
f = fas_charset[k-1].To + 1
|
||||
|
@ -35,3 +37,9 @@ func fas_count(sum_nex []dna) []charset {
|
|||
fmt.Println(fas_charset)
|
||||
return fas_charset
|
||||
}
|
||||
|
||||
func fas_name(old_name string) string {
|
||||
// 需要 最后一个/开始,一个.结束 中间的部分
|
||||
// 正则表达式
|
||||
return old_name
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue