splitinternal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(currentPath string) (baseDir, fileName string)

func GetAllSplits added in v0.0.6

func GetAllSplits(currentPath string) (baseDirNames *[]string)

Ref : https://play.golang.org/p/oT6eWNZAeEi

func GetAllSplitsWithSep added in v0.0.6

func GetAllSplitsWithSep(
	currentPath, separator string,
) (baseDirNames *[]string)

func GetBaseDir

func GetBaseDir(currentPath string) (baseDir string)

No slash at the end reference example : https://play.golang.org/p/BJRR0Wk7GhJ

func GetBaseDirName added in v0.0.6

func GetBaseDirName(currentPath string) (baseDirName string)

reference example : https://play.golang.org/p/BJRR0Wk7GhJ

func GetBaseDirNames added in v0.0.6

func GetBaseDirNames(currentPath string) (baseDirNames *[]string)

func GetBaseDirPlusName added in v0.0.6

func GetBaseDirPlusName(currentPath string) (baseDir, baseDirName string)

No slash at the end reference example : https://play.golang.org/p/BJRR0Wk7GhJ

func GetBothExtension added in v0.0.6

func GetBothExtension(currentPath string) (dotExt, ext string)

func GetFileNameDotExt

func GetFileNameDotExt(currentPath string) (fileName string, dotExt string)

func GetFileNameWithExt

func GetFileNameWithExt(currentPath string) (fileName string)

reference example : https://play.golang.org/p/oT6eWNZAeEi

func GetFileNameWithoutExt

func GetFileNameWithoutExt(currentPath string) (filename string)

invalid ext should return empty string. reference example : https://play.golang.org/p/oT6eWNZAeEi

func GetFilenamePlusBothExtensions

func GetFilenamePlusBothExtensions(
	currentPath string,
) (
	fileName, dotExt, ext string,
)

func GetFilenamePlusExt

func GetFilenamePlusExt(currentPath string) (fileName string, ext string)

func GetWithoutSlash

func GetWithoutSlash(currentPath string) (baseDir, fileName string)

func IndexOfDotFromLastFileName

func IndexOfDotFromLastFileName(currentPath string) (fileName string, index int)

returns -1 if last file name doesn't have any extension reference example : https://play.golang.org/p/oT6eWNZAeEi

func LastSlash

func LastSlash(s string) int

lastSlash(s) is strings.LastIndex(s, "/" or "\\")

Types

This section is empty.

Jump to

Keyboard shortcuts

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