From: Alan T. DeKok Date: Tue, 3 Oct 2023 12:27:05 +0000 (-0400) Subject: note deprecated functions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c50198adea89d5053f3a656eb65bc5499c740d6c;p=thirdparty%2Ffreeradius-server.git note deprecated functions --- diff --git a/doc/antora/modules/reference/pages/xlat/builtin.adoc b/doc/antora/modules/reference/pages/xlat/builtin.adoc index 99de6151aff..fce3e64bec7 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(