strongStringGo

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	COMMAND_PREFIX1 = "!"
	COMMAND_PREFIX2 = "/"
	SUDO_PREFIX1    = ">"
	FLAG_PREFIX     = "--"
)

the prefex values for commands.

View Source
const (
	JA_Flag       = "〰\u200d;〰"
	JA_Str        = "❞\u200d;" // start character (") for string in japanese.
	JA_Equality   = "=\u200d;" // equal character (=) in japanese.
	JA_Ddot       = ":\u200d;" // ddot character (:) in japanese.
	JA_Cama       = "、\u200d;" // cama character (,) in japanese.
	JA_RealStr    = "\uff4e"   // the real str
	JA_BrOpen     = "「\u200d;" // the real str
	JA_BrClose    = "」\u200d;" // the real str
	BACK_Str      = `\"`
	BACK_Flag     = `\--`
	BACK_Equality = `\=`
	BACK_Ddot     = `\:`
	BACK_Cama     = `\,`
	BACK_BrOpen   = `\[`
	BACK_BrClose  = `\]`
)
View Source
const (
	BaseIndex    = 0 // number 0
	BaseOneIndex = 1 // number 1
)

the base constant values.

View Source
const (
	BaseIndexStr    = "0" // number 0
	BaseOneIndexStr = "1" // number 1
	DotStr          = "." // dot : .
	LineStr         = "-" // line : -
	EMPTY           = ""  //an empty string.
	UNDER           = "_" // an underscope : _
	STR_SIGN        = `"` // the string sign : "
	CHAR_STR        = '"' // the string sign : '"'
)

additional constants which are not actually used in this package, but may be useful in another packages.

View Source
const (
	APP_PORT        = "PORT"
	GET_SLASH       = "/"
	HTTP_ADDRESS    = ":"
	FORMAT_VALUE    = "%v"
	SPACE_VALUE     = " "
	LineEscape      = "\n"
	R_ESCAPE        = "\r"
	SEMICOLON       = ";"
	CAMA            = ","
	ParaOpen        = "("
	ParaClose       = ")"
	NullStr         = "null"
	DoubleQ         = "\""
	SingleQ         = "'"
	DoubleQJ        = "”"
	BracketOpen     = "["
	Bracketclose    = "]"
	Star            = "*"
	BackSlash       = "\\"
	DoubleBackSlash = "\\\\"
	Point           = "."
	AutoStr         = "auto"
	AtSign          = "@"

	EqualStr = "="
	DdotSign = ":"
	Yes      = "Yes"
	No       = "No"
)

router config values

View Source
const (
	LineChar         = '-' // line : '-'
	EqualChar        = '=' // equal: '='
	SpaceChar        = ' ' // space: ' '
	DPointChar       = ':' // double point: ':'
	BracketOpenChar  = '['
	BracketcloseChar = ']'
)

Variables

This section is empty.

Functions

func FixSplit

func FixSplit(myStrings []string) []string

FixSplit will fix the bullshit bug in the Split function (which is not ignoring the spaces between strings).

func IsEmpty

func IsEmpty(s *string) bool

IsEmpty function will check if the passed-by string value is empty or not.

func Qsb

func Qsb(b []byte) sin.QString

QSb will generate a new QString with the specified non-encoded bytes value.

func Qss

func Qss(s string) sin.QString

Qss will generate a new QString with the specified non-encoded string value.

func Split

func Split(s string, separator ...string) []string

func SplitN

func SplitN(s string, n int, separator ...string) []string

func SplitSlice

func SplitSlice(s string, separator []string) []string

func SplitSliceN

func SplitSliceN(s string, separator []string, n int) []string

func ToQSlice

func ToQSlice(strs []string) []sin.QString

func ToStrSlice

func ToStrSlice(qs []sin.QString) []string

func YesOrNo

func YesOrNo(v bool) string

YesOrNo returns yes if v is true, otherwise no,

Types

type StrongString

type StrongString struct {
	// contains filtered or unexported fields
}

the StrongString used in the program for High-security!

func Sb

func Sb(b []byte) StrongString

Sb will generate a new StrongString with the specified non-encoded bytes value.

func SbPtr

func SbPtr(b []byte) *StrongString

Sb will generate a new StrongString pointer with the specified non-encoded bytes value.

func Ss

func Ss(s string) StrongString

Ss will generate a new StrongString with the specified non-encoded string value.

func SsPtr

func SsPtr(s string) *StrongString

SS will generate a new StrongString with the specified non-encoded string value.

func SsTrim

func SsTrim(s, cutset string) StrongString

SsTrim will trim all leading and trailing Unicode code points contained in cutset of the specified string value and then will generate a new StrongString with that value.

func SsTrimSpace

func SsTrimSpace(s string) StrongString

SsTrimSpace will trim all whitespaces of the specified string value and then will generate a new StrongString with that value.

func (*StrongString) Contains

func (s *StrongString) Contains(qs ...tf.QString) bool

func (*StrongString) ContainsAll

func (s *StrongString) ContainsAll(qs ...tf.QString) bool

func (*StrongString) ContainsStr

func (s *StrongString) ContainsStr(str ...string) bool

func (*StrongString) ContainsStrAll

func (s *StrongString) ContainsStrAll(str ...string) bool

func (*StrongString) GetIndexV

func (s *StrongString) GetIndexV(_index int) rune

GetIndexV method will give you the rune in _index.

func (*StrongString) GetValue

func (s *StrongString) GetValue() string

GetValue will give you the real value of this StrongString.

func (*StrongString) HasPrefix

func (s *StrongString) HasPrefix(values ...string) bool

HasPrefix will check if at least there is one prefix is presents in this StrongString or not. the StrongString should starts with at least one of these prefixes.

func (*StrongString) HasPrefixes

func (s *StrongString) HasPrefixes(values ...string) bool

HasPrefixes will check if all of the prefixes are present in this StrongString or not. the StrongString should starts with all of these suffixes. usage of this method is not recommended, since you can use HasSuffix method with only one string (the longest string). this way you will just use too much cpu resources.

func (*StrongString) HasSuffix

func (s *StrongString) HasSuffix(values ...string) bool

HasSuffix will check if at least there is one suffix is presents in this StrongString not. the StrongString should ends with at least one of these suffixes.

func (*StrongString) HasSuffixes

func (s *StrongString) HasSuffixes(values ...string) bool

HasSuffixes will check if all of the suffixes are present in this StrongString or not. the StrongString should ends with all of these suffixes. usage of this method is not recommended, since you can use HasSuffix method with only one string (the longest string). this way you will just use too much cpu resources.

func (*StrongString) IsEmpty

func (s *StrongString) IsEmpty() bool

isEmpty will check if this StrongString is empty or not.

func (*StrongString) IsEqual

func (s *StrongString) IsEqual(_q tf.QString) bool

isEqual will check if the passed-by-value in the arg is equal to this StrongString or not.

func (*StrongString) Length

func (s *StrongString) Length() int

length method, will give you the length-as-int of this StrongString.

func (*StrongString) LockSpecial

func (s *StrongString) LockSpecial()

LockSpecial will lock all the defiend special characters. This way, you don't actually have to be worry about some normal mistakes in spliting strings, cut them out, check them. join them, etc... WARNING: this method is so dangerous, it's really dangerous. we can't say that it's unsafe actually, but still it's really dangerous, so if you don't know what the fuck are you doing, then please don't use this method. this method will not return you a new value, it will effect the current value. please consider using it carefully.

func (*StrongString) LockSpecialHigh

func (s *StrongString) LockSpecialHigh()

LockSpecial will lock all the defiend special characters. This way, you don't actually have to be worry about some normal mistakes in spliting strings, cut them out, check them. join them, etc... WARNING: this method is so dangerous, it's really dangerous. we can't say that it's unsafe actually, but still it's really dangerous, so if you don't know what the fuck are you doing, then please don't use this method. this method will not return you a new value, it will effect the current value. please consider using it carefully.

func (*StrongString) Replace

func (s *StrongString) Replace(qs, newS tf.QString) tf.QString

func (*StrongString) ReplaceStr

func (s *StrongString) ReplaceStr(qs, newS string) tf.QString

func (*StrongString) Split

func (s *StrongString) Split(qs ...tf.QString) []tf.QString

Split will split the StrongString using the given separator values and will return the results as a QString array.

func (*StrongString) SplitFirst

func (s *StrongString) SplitFirst(qs ...tf.QString) []tf.QString

func (*StrongString) SplitN

func (s *StrongString) SplitN(n int, qs ...tf.QString) []tf.QString

func (*StrongString) SplitStr

func (s *StrongString) SplitStr(qs ...string) []tf.QString

func (*StrongString) SplitStrFirst

func (s *StrongString) SplitStrFirst(qs ...string) []tf.QString

func (*StrongString) SplitStrN

func (s *StrongString) SplitStrN(n int, qs ...string) []tf.QString

func (*StrongString) ToQString

func (s *StrongString) ToQString() tf.QString

func (*StrongString) Trim

func (s *StrongString) Trim(qs ...tf.QString) tf.QString

func (*StrongString) TrimPrefix

func (s *StrongString) TrimPrefix(qs ...tf.QString) tf.QString

func (*StrongString) TrimPrefixStr

func (s *StrongString) TrimPrefixStr(qs ...string) tf.QString

func (*StrongString) TrimStr

func (s *StrongString) TrimStr(qs ...string) tf.QString

func (*StrongString) TrimSuffix

func (s *StrongString) TrimSuffix(qs ...tf.QString) tf.QString

func (*StrongString) TrimSuffixStr

func (s *StrongString) TrimSuffixStr(qs ...string) tf.QString

func (*StrongString) UnlockSpecial

func (s *StrongString) UnlockSpecial()

UnlockSpecial will unlock all the defiend special characters. it will return them to their normal form.

func (*StrongString) UnlockSpecialHigh

func (s *StrongString) UnlockSpecialHigh()

UnlockSpecial will unlock all the defiend special characters. it will return them to their normal form.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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