Documentation
¶
Index ¶
- Variables
- type String
- func (s String) Equal(other String) bool
- func (s String) IsEmpty() bool
- func (s String) IsNull() bool
- func (s String) MarshalJSON() ([]byte, error)
- func (s String) NonEmpty() String
- func (s String) Or(other String) String
- func (s String) OrString(alt string) String
- func (s String) String() string
- func (s String) Unwrap() string
Constants ¶
This section is empty.
Variables ¶
View Source
var NullString = String{nil}
NullString represents an empty optional String.
Functions ¶
This section is empty.
Types ¶
type String ¶
type String struct {
Value *string
}
String holds an optional string value.
func NewNotEmptyString ¶
NewNotEmptyString creates a new optional String with the given value or returns NullString if the value is an empty string.
func NewStringWithPtr ¶
NewString creates a new optional String with the given pointer. When nil, the String is considered null, but an empty String is valid.
func (String) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.