tape: Add StringTag
This commit is contained in:
parent
5a3296a842
commit
2305814e10
@ -54,6 +54,11 @@ func BufferTag(value []byte) Tag {
|
||||
return bufferLenTag(len(value))
|
||||
}
|
||||
|
||||
// StringTag returns the appropriate tag for a string.
|
||||
func StringTag(value string) Tag {
|
||||
return bufferLenTag(len(value))
|
||||
}
|
||||
|
||||
func bufferLenTag(length int) Tag {
|
||||
if length < int(CNLimit) {
|
||||
return SBA.WithCN(length)
|
||||
|
Loading…
Reference in New Issue
Block a user