splitinternal

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPathExtensionOnRequired added in v0.2.4

func AddPathExtensionOnRequired(
	location string,
	dotExtension string,
) (locationFinal string)

func Get

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

func GetAllSplits added in v0.0.6

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

GetAllSplits 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)

func GetBaseDirNameOrEmpty added in v0.2.4

func GetBaseDirNameOrEmpty(currentPath string) (baseDirName string)

GetBaseDirNameOrEmpty 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)

GetFileNameWithExt 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 LastDot added in v0.2.4

func LastDot(s string) int

func LastSlash

func LastSlash(s string) int

LastSlash 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