From c50198adea89d5053f3a656eb65bc5499c740d6c Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Tue, 3 Oct 2023 08:27:05 -0400 Subject: [PATCH] note deprecated functions --- .../modules/reference/pages/xlat/builtin.adoc | 97 +++++++------------ 1 file changed, 35 insertions(+), 62 deletions(-) diff --git a/doc/antora/modules/reference/pages/xlat/builtin.adoc b/doc/antora/modules/reference/pages/xlat/builtin.adoc index 99de6151af..fce3e64bec 100644 --- a/doc/antora/modules/reference/pages/xlat/builtin.adoc +++ b/doc/antora/modules/reference/pages/xlat/builtin.adoc @@ -57,38 +57,6 @@ The random number is 347 ``` ==== -=== %string() - -Convert input to a string if (possible). For _octets_ type -attributes, this means interpreting the data as a UTF8 string. Any -non-printable characters are left in place. - -For other types, this means printing the value in its _presentation_ format, -i.e. dotted quads for IPv4 addresses, link:https://en.wikipedia.org/wiki/ISO_8601[ISO 8601] -time for date types, enumeration values for attributes such as `radius.Service-Type` etc. - -In practice, the only real use of this expansion is to insert `octets` -data types into a `string`. For other data types, using -`%string(...)` is not necessary. For example, for any data type -other than `octets`, the following equivalency holds true. - -See xref:type/string/double.adoc[double-quoted strings] and -xref:type/cast.adoc[casting] for examples of how strings are used. - -.String expansion equivalents -==== -[source,unlang] ----- -"foo" + (string)&Bar == "foo%{Bar}" ----- -==== - -.Output - -``` -The string value of 0x7465737431 is test1 -``` - == Encoders and Decoders The server supports manual encoding and decoding of a variety of @@ -481,26 +449,6 @@ Get random string built from character classes. The random string output is 4Uq0gPyG ``` -=== %strlen( ... ) - -Length of given string. This expansion is deprecated. The `%length(...)` function should be used instead. - -.Return: _integer_ - -.Example - -[source,unlang] ----- -&control.Tmp-String-0 := "Caipirinha" -&reply.Reply-Message := "The length of %{control.Tmp-String-0} is %strlen(&control.Tmp-String-0)" ----- - -.Output - -``` -The length of Caipirinha is 21 -``` - === %tolower( ... ) Dynamically expands the string and returns the lowercase version of @@ -868,16 +816,6 @@ bob not bob! ``` - -=== %expr() - -This expansion has been removed. Instead, just use `%{...}` with math inside of the brackets. - -[source,unlang] ----- -&reply.Reply-Message := "Adding 1 + 2 = %{1 + 2}" ----- - === %nexttime(