constants

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package constants provides common constants used throughout go-calcmark

Index

Constants

View Source
const (
	// Whitespace characters (per ENCODING_SPEC.md Section 2)
	// Only these 4 Unicode code points are considered whitespace:
	// - U+0020 (Space)
	// - U+0009 (Tab)
	// - U+000D (Carriage Return)
	// - U+000A (Line Feed)
	Tab     = "\t"
	Newline = "\n"
	Space   = " "

	// Common whitespace string for Trim operations
	// Includes all CalcMark whitespace characters
	Whitespace = " \t\r\n"
)

Character literals used in parsing and classification

Variables

This section is empty.

Functions

func IsBlankLine

func IsBlankLine(line string) bool

IsBlankLine returns true if the line contains only CalcMark whitespace or is empty.

func TrimSpace

func TrimSpace(s string) string

TrimSpace removes CalcMark whitespace from both ends of a string. Unlike strings.TrimSpace(), this only removes the 4 whitespace characters defined in ENCODING_SPEC.md, not all Unicode whitespace (category Z).

Types

This section is empty.

Jump to

Keyboard shortcuts

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