summaryrefslogtreecommitdiffstats
path: root/src/utils/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/mod.rs')
-rw-r--r--src/utils/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
index a3aef22..6f89fbe 100644
--- a/src/utils/mod.rs
+++ b/src/utils/mod.rs
@@ -38,6 +38,10 @@ pub fn get_env_name(key: &str) -> String {
format!("{}_{key}", env!("CARGO_CRATE_NAME"),).to_ascii_uppercase()
}
+pub fn normalize_env_name(value: &str) -> String {
+ value.replace('-', "_").to_ascii_uppercase()
+}
+
pub fn estimate_token_length(text: &str) -> usize {
let words: Vec<&str> = text.unicode_words().collect();
let mut output: f32 = 0.0;