cleanup, docs
This commit is contained in:
@@ -2,15 +2,16 @@
|
||||
String safe_name(String raw)
|
||||
|
||||
:params
|
||||
raw : arbitrary display/name text
|
||||
return value : normalized safe name
|
||||
raw : arbitrary input string
|
||||
return value : a sanitized name safe to use as a file or key name
|
||||
|
||||
:content
|
||||
Sanitizes a string into a safe name by normalizing or stripping characters that are unsafe in file names and identifiers (whitespace, separators, control characters). Use it before turning user input into a file name or cache key.
|
||||
|
||||
:example
|
||||
print(safe_name("My Report: 2024/Q1!"), "\n");
|
||||
|
||||
:see
|
||||
>string
|
||||
>ascii_safe_name
|
||||
|
||||
:content
|
||||
Returns a filesystem/identifier-friendly name while preserving more Unicode input than `ascii_safe_name()` where supported.
|
||||
|
||||
:example
|
||||
print("safe_name example\n");
|
||||
ascii_safe_name
|
||||
runtime_safe_key
|
||||
|
||||
Reference in New Issue
Block a user