Index: ossp-web/pkg/lib/var/index.wml RCS File: /v/ossp/cvs/ossp-web/pkg/lib/var/index.wml,v co -q -kk -p'1.11' '/v/ossp/cvs/ossp-web/pkg/lib/var/index.wml,v' | diff -u /dev/null - -L'ossp-web/pkg/lib/var/index.wml' 2>/dev/null --- ossp-web/pkg/lib/var/index.wml +++ - 2025-04-18 21:36:07.286978152 +0200 @@ -0,0 +1,70 @@ + +#use wml::ossp area=pkg:lib subarea=var + +OSSP var + +

Variable Expansion

+ +

Abstract

+ +OSSP var is a flexible, full-featured and fast variable construct +expansion library. It supports a configurable variable construct +syntax very similar to the style found in many scripting languages +(like @name, ${name}, $(name), etc.) +and provides both simple scalar (${name}) and array +(${name[index]}) expansion, plus optionally one or more +post-operations on the expanded value (${name:op:op...}). + +

+The supported post-operations are length determination, case conversion, +defaults, postive and negative alternatives, sub-strings, regular +expression based substitutions, character translations, and padding. +Additionally, a meta-construct plus arithmetic expressions for index and +range calculations allow (even nested) iterations over array variable +expansions (..[..${name[#+1]}..]..). The actual variable value +lookup is performed through a callback function, so OSSP var can expand +arbitrary values. + +

+

+ +Hint: There is also an ISO C++ derivative of the OSSP var library, named +libvarexp. It is based on +a development version of OSSP var and hence does not provide exactly +the same amount of functionality. But it provides an ISO C++ API and so +can be of interest to you if you are programming in ISO C++ (where OSSP +var's ISO C API might be too boring for you). + +
+ +

Documentation

+ +, +. + +

Authors

+ + + + +

Status

+ + + +

Source

+ + + +

Donation

+ + +