stdlib

package
v0.4.22 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

pkg/stdlib/array.go Array utilities for the Xxlang standard library.

pkg/stdlib/bytes.go Byte manipulation utilities for the Xxlang standard library.

pkg/stdlib/collections.go Collection utilities for the Xxlang standard library.

pkg/stdlib/crypto.go Cryptography utilities for the Xxlang standard library. Pure Go implementation using standard library - no CGO required.

pkg/stdlib/csv.go CSV parsing and generation utilities for the Xxlang standard library.

pkg/stdlib/debug.go Debug utilities for the Xxlang standard library.

pkg/stdlib/encoding.go Encoding utilities for the Xxlang standard library.

pkg/stdlib/env.go Environment variables and configuration utilities for the Xxlang standard library.

pkg/stdlib/fmt.go Advanced formatting utilities for the Xxlang standard library.

pkg/stdlib/fp.go Functional programming utilities for the Xxlang standard library.

pkg/stdlib/io.go I/O utilities for the Xxlang standard library.

pkg/stdlib/json.go JSON utilities for the Xxlang standard library.

pkg/stdlib/log.go Logging utilities for the Xxlang standard library.

pkg/stdlib/math.go Standard library math module.

pkg/stdlib/net.go Network utilities for the Xxlang standard library.

pkg/stdlib/os.go OS utilities for the Xxlang standard library.

pkg/stdlib/regex.go Regular expression utilities for the Xxlang standard library. Uses regexp2 for full PCRE support including lookahead/lookbehind.

pkg/stdlib/sort.go Sorting utilities for the Xxlang standard library.

pkg/stdlib/stdlib.go Standard library modules for Xxlang.

pkg/stdlib/strconv.go String conversion utilities for the Xxlang standard library.

pkg/stdlib/string.go String utilities for the Xxlang standard library.

pkg/stdlib/stringbuilder.go StringBuilder module for efficient string concatenation.

pkg/stdlib/text.go Text processing utilities for the Xxlang standard library.

pkg/stdlib/time.go Time utilities for the Xxlang standard library.

pkg/stdlib/utils.go Utility functions for the Xxlang standard library.

pkg/stdlib/uuid.go UUID generation utilities for the Xxlang standard library.

pkg/stdlib/validate.go Validation utilities for the Xxlang standard library.

Index

Constants

This section is empty.

Variables

View Source
var Registry = make(map[string]*Module)

Registry holds all registered standard library modules.

Functions

func Array

func Array(elements ...objects.Object) *objects.Array

Array creates an array object.

func Bool

func Bool(v bool) *objects.Bool

Bool creates a boolean object.

func BuiltinFunc

func BuiltinFunc(fn func(...objects.Object) objects.Object) *objects.Builtin

BuiltinFunc creates a builtin function object.

func Error

func Error(msg string) *objects.Error

Error creates an error object.

func Float

func Float(v float64) *objects.Float

Float creates a float object.

func GetConfigMap added in v0.4.19

func GetConfigMap() map[string]interface{}

GetConfigMap reads the Xxlang configuration and returns it as a Go map. This is useful for accessing config values from Go code before the VM starts. Search path priority: 1. ~/.xxl/settings.json (user home directory) 2. /.xxl/settings.json (Linux/Unix systems) 3. C:\.xxl\settings.json (Windows systems) Returns an empty map if no config file is found.

func Has

func Has(name string) bool

Has checks if a module exists in the registry.

func Int

func Int(v int64) *objects.Int

Int creates an integer object.

func Null

func Null() *objects.Null

Null returns the null object.

func Register

func Register(m *Module)

Register adds a module to the registry.

func SetScriptArgs added in v0.4.19

func SetScriptArgs(args []string)

SetScriptArgs sets the script-specific arguments for scripts to access

func String

func String(v string) *objects.String

String creates a string object.

Types

type CompiledRegex

type CompiledRegex struct {
	Pattern string
	Re      *regexp2.Regexp
}

CompiledRegex represents a compiled regular expression

func (*CompiledRegex) HashKey

func (cr *CompiledRegex) HashKey() objects.HashKey

func (*CompiledRegex) Inspect

func (cr *CompiledRegex) Inspect() string

func (*CompiledRegex) ToBool

func (cr *CompiledRegex) ToBool() *objects.Bool

func (*CompiledRegex) Type

func (cr *CompiledRegex) Type() objects.ObjectType

func (*CompiledRegex) TypeTag

func (cr *CompiledRegex) TypeTag() objects.TypeTag

type Module

type Module struct {
	Name    string
	Exports map[string]objects.Object
}

Module represents a standard library module.

func Get

func Get(name string) *Module

Get retrieves a module from the registry.

Jump to

Keyboard shortcuts

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