Documentation
¶
Overview ¶
Package text ports upstream packages/coding-agent/src/utils/text.ts: the leading byte order mark helpers every Pi reader applies before parsing user-authored JSON, markdown, and text files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitBom ¶
SplitBom splits a leading UTF-8 byte order mark from decoded text. It returns the mark ("" when absent) and the remaining text. Mirrors upstream splitBom.
func StripBom ¶
StripBom removes a leading UTF-8 byte order mark from decoded text. Mirrors upstream stripBom.
func StripBomBytes ¶
StripBomBytes is StripBom for file contents read as bytes, so JSON readers can strip the mark before decoding without a string round trip.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.