From af4239e198a841a2de4daf4c8ead53c0b2cb6bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominic=20H=C3=B6glinger?= Date: Sat, 25 Apr 2026 12:04:15 +0200 Subject: [PATCH] Rename hex() to hexlit(), use lowercase by default, add string case converstions --- Transformation/ContextFunctions.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Transformation/ContextFunctions.cs b/Transformation/ContextFunctions.cs index e2aa770..9920d43 100644 --- a/Transformation/ContextFunctions.cs +++ b/Transformation/ContextFunctions.cs @@ -12,10 +12,20 @@ namespace XNeedle.Transformation { public class ContextFunctions { - public static string hex(Context ctx, double value) + public static string hexlit(Context ctx, double value) { uint v = (uint)value; - return $"#x{v:X8}"; + return $"#x{v:x8}"; + } + + public static string lower(Context ctx, string text) + { + return text.ToLower(); + } + + public static string upper(Context ctx, string text) + { + return text.ToUpper(); } public static double GetLevel(Context ctx)