Package kotools.csv

Types

CsvPathResult
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
interface CsvPathResult

Object returned when trying to build a CSV path.

Functions

csv
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
fun String.csv(): CsvPathResult.FromString

Returns this string as a CSV path suffixed with the .csv extension, or returns a CsvPathResult.Exception.BlankString when this string is blank, or returns a CsvPathResult.Exception.CsvExtensionAsPath when this string equals the .csv extension.

@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
fun NotBlankString.csv(): CsvPathResult.FromNotBlankString

Returns this string as a CSV path suffixed with the .csv extension, or returns a CsvPathResult.Exception.CsvExtensionAsPath if this string equals the .csv extension.

csvOrNull
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
fun String.csvOrNull(): CsvPathResult.Success?

Returns this string as a CSV path suffixed with the .csv extension, or returns null when this string is blank or equals the .csv extension.

@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
fun NotBlankString.csvOrNull(): CsvPathResult.Success?

Returns this string as a CSV path suffixed with the .csv extension, or returns null if this string equals the .csv extension.

csvOrThrow
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
fun String.csvOrThrow(): CsvPathResult.Success

Returns this string as a CSV path suffixed with the .csv extension, or throws a CsvPathResult.Exception.BlankString when this string is blank, or throws a CsvPathResult.Exception.CsvExtensionAsPath when this string equals the .csv extension.

@SinceKotools(project = Project.Csv, version = "2.3", stability = StabilityLevel.Alpha)
fun NotBlankString.csvOrThrow(): CsvPathResult.Success

Returns this string as a CSV path suffixed with the .csv extension, or throws a CsvPathResult.Exception.CsvExtensionAsPath if this string equals the .csv extension.