quotes

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BasicEnumImpl = rangesMap.BasicByte(
		coredynamic.TypeName(Invalid))
)

Functions

func HasBothWrappedWith

func HasBothWrappedWith(str string, quote Quote) bool

func UnWrapWith

func UnWrapWith(str string, quote Quote) string

UnWrapWith

Note : It doesn't care about in quotes exist in middle of (str), it just un-wrap from both sides if quotes are there.

func WrapWith

func WrapWith(str string, quote Quote, isSkipOnExists bool) string

WrapWith

if isSkipOnExists true then if quotes are already exist then skip the wrapping process.
Note : That it doesn't care about in middle quotes, it just wraps around.

Types

type Quote

type Quote byte
const (
	Invalid  Quote = iota
	Double   Quote = '"'
	Single   Quote = '\''
	Backtick Quote = '`'
)

func (Quote) AllNameValues

func (it Quote) AllNameValues() []string

func (Quote) AsBasicByteEnumContractsBinder

func (it Quote) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder

func (*Quote) AsBasicEnumContractsBinder

func (it *Quote) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder

func (Quote) EnumType

func (it Quote) EnumType() enuminf.EnumTyper

func (Quote) Format

func (it Quote) Format(format string) (compiled string)

func (Quote) GetOther

func (it Quote) GetOther() Quote

func (Quote) IntegerEnumRanges

func (it Quote) IntegerEnumRanges() []int

func (Quote) IsAnyNamesOf

func (it Quote) IsAnyNamesOf(names ...string) bool

func (Quote) IsAnyOf

func (it Quote) IsAnyOf(anyOfItems ...Quote) bool

func (Quote) IsAnyValuesEqual

func (it Quote) IsAnyValuesEqual(anyByteValues ...byte) bool

func (Quote) IsByteValueEqual

func (it Quote) IsByteValueEqual(value byte) bool

func (Quote) IsEqual

func (it Quote) IsEqual(char uint8) bool

func (Quote) IsInvalid

func (it Quote) IsInvalid() bool

func (Quote) IsNameEqual

func (it Quote) IsNameEqual(name string) bool

func (Quote) IsNameOf

func (it Quote) IsNameOf(anyNames ...string) bool

func (Quote) IsValid

func (it Quote) IsValid() bool

func (Quote) IsValueEqual

func (it Quote) IsValueEqual(value byte) bool

func (Quote) IsWrapped

func (it Quote) IsWrapped(
	source string,
) bool

func (Quote) MarshalJSON

func (it Quote) MarshalJSON() ([]byte, error)

func (Quote) MaxByte

func (it Quote) MaxByte() byte

func (Quote) MaxInt

func (it Quote) MaxInt() int

func (Quote) MaxMaxAny

func (it Quote) MaxMaxAny() (min, max interface{})

func (Quote) MaxValueString

func (it Quote) MaxValueString() string

func (Quote) MinByte

func (it Quote) MinByte() byte

func (Quote) MinInt

func (it Quote) MinInt() int

func (Quote) MinValueString

func (it Quote) MinValueString() string

func (Quote) Name

func (it Quote) Name() string

func (Quote) NameValue

func (it Quote) NameValue() string

func (Quote) OnlySupportedErr

func (it Quote) OnlySupportedErr(names ...string) error

func (Quote) OnlySupportedMsgErr

func (it Quote) OnlySupportedMsgErr(message string, names ...string) error

func (Quote) RangeNamesCsv

func (it Quote) RangeNamesCsv() string

func (Quote) RangesByte

func (it Quote) RangesByte() []byte

func (Quote) RangesDynamicMap

func (it Quote) RangesDynamicMap() map[string]interface{}

func (Quote) SelfWrap

func (it Quote) SelfWrap() string

func (Quote) String

func (it Quote) String() string

func (*Quote) ToNumberString

func (it *Quote) ToNumberString() string

func (Quote) ToPtr

func (it Quote) ToPtr() *Quote

func (Quote) TypeName

func (it Quote) TypeName() string

func (Quote) UnWrap

func (it Quote) UnWrap(
	source string,
) string

func (*Quote) UnmarshalJSON

func (it *Quote) UnmarshalJSON(data []byte) error

func (*Quote) UnmarshallEnumToValue

func (it *Quote) UnmarshallEnumToValue(
	jsonUnmarshallingValue []byte,
) (byte, error)

func (Quote) Value

func (it Quote) Value() byte

func (Quote) ValueByte

func (it Quote) ValueByte() byte

func (Quote) ValueInt

func (it Quote) ValueInt() int

func (Quote) ValueInt16

func (it Quote) ValueInt16() int16

func (Quote) ValueInt32

func (it Quote) ValueInt32() int32

func (Quote) ValueInt8

func (it Quote) ValueInt8() int8

func (Quote) ValueString

func (it Quote) ValueString() string

func (Quote) ValueUInt16

func (it Quote) ValueUInt16() uint16

func (Quote) Wrap

func (it Quote) Wrap(str string) string

func (Quote) WrapAny

func (it Quote) WrapAny(source interface{}) string

func (Quote) WrapAnySkipOnExist

func (it Quote) WrapAnySkipOnExist(source interface{}) string

func (Quote) WrapFmtString

func (it Quote) WrapFmtString(
	format, sourceString string,
) string

WrapFmtString

{wrapped} will be replaced in the
format by the wrapped string.

func (Quote) WrapRegardless

func (it Quote) WrapRegardless(
	source string,
) string

func (Quote) WrapSkipOnExist

func (it Quote) WrapSkipOnExist(
	source string,
) string

func (Quote) WrapString

func (it Quote) WrapString(
	sourceString string,
) string

func (Quote) WrapWithOptions

func (it Quote) WrapWithOptions(
	isSkipOnExist bool,
	source string,
) string

type QuoteStatus

type QuoteStatus struct {
	IsQuoteFound bool
	Found        Quote
	IsLeft       bool
}

func EmptyQuoteStatus

func EmptyQuoteStatus() QuoteStatus

func WhichQuote

func WhichQuote(char byte, isLeft bool) QuoteStatus

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL