-
Notifications
You must be signed in to change notification settings - Fork 4
npp_filter_strict
Jurek Muszyński edited this page Mar 31, 2022
·
2 revisions
Filters string, retaining only characters suitable for a file name. This means only lower- and upper-case English letters and digits. Spaces are converted to underscores. Maximum destination length, including terminating NULL can be NPP_LIB_STR_BUF bytes.
Returns pointer to converted, zero-terminated static string.
// let user download generated file
RES_CONTENT_DISPOSITION("attachment; filename=\"%s.pdf\"", npp_filter_strict(npp_convert(name, "UTF-8", "ASCII//TRANSLIT")));