util

package
v5.0.1 Latest Latest
Warning

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

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

Documentation

Overview

Package util provides common utility functions used across the OCAP recorder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixEscapeQuotes

func FixEscapeQuotes(s string) string

FixEscapeQuotes replaces escaped double quotes ("") with single double quotes (").

func FormatWeaponText

func FormatWeaponText(vehicle, weapon, magazine string) string

FormatWeaponText builds a display string from the weapon array components. Format: "Vehicle: Weapon [Magazine]" with empty parts omitted.

func ParseSQFStringArray

func ParseSQFStringArray(s string) (vehicle, weapon, magazine string)

ParseSQFStringArray parses a stringified SQF array of 3 quoted strings. Input format: ["str1","str2","str3"] Returns the three strings. If parsing fails, returns the input as the second element (weapon) with empty vehicle and magazine, preserving backward compatibility.

func TrimQuotes

func TrimQuotes(s string) string

TrimQuotes removes leading and trailing double quotes from a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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