content

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Overview

Package content provides utilities for analyzing and manipulating file content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBinaryContent

func IsBinaryContent(content []byte) bool

IsBinaryContent checks if content bytes contain binary data by looking for null bytes. It handles UTF-16 and UTF-32 BOMs specially to avoid false positives. This is a pure function with no state - import and use directly.

func SplitLines

func SplitLines(content string) []string

SplitLines splits content into lines, handling both \n and \r\n line endings. It returns a slice of strings, each representing a line without its line ending. If the content ends with a newline sequence, it does NOT return a trailing empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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