mirror of
https://github.com/xiaoqidun/goini.git
synced 2024-11-23 06:56:46 +08:00
Add files via upload
This commit is contained in:
parent
614b5ea11a
commit
cec5198500
4
goini.go
4
goini.go
@ -33,6 +33,10 @@ func (ini *GoINI) String() string {
|
|||||||
}
|
}
|
||||||
for _, key := range ini.GetNameKeys(name, "") {
|
for _, key := range ini.GetNameKeys(name, "") {
|
||||||
nameValue := ini.GetString(name, key, "")
|
nameValue := ini.GetString(name, key, "")
|
||||||
|
if ok, _ := regexp.MatchString("^\\s|\\s$", nameValue); ok {
|
||||||
|
iniLines = append(iniLines, key+" = \""+nameValue+"\"")
|
||||||
|
continue
|
||||||
|
}
|
||||||
nameValueLen := len(nameValue)
|
nameValueLen := len(nameValue)
|
||||||
if nameValueLen >= 2 &&
|
if nameValueLen >= 2 &&
|
||||||
((nameValue[0] == 34 && nameValue[nameValueLen-1] == 34) ||
|
((nameValue[0] == 34 && nameValue[nameValueLen-1] == 34) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user