Skip to content

normalizeFile

Requires a Node.js runtime ('qsu/node')

Returns the file name within the path.

Parameters

NameTypeRequiredDefault
filePathstringStringstr
File or directory path
normalizationFormnamedkeyword'NFC' | 'NFD' | 'NFKC' | 'NFKD''NFC'
Normalization method.

namedThese parameters are passed as named parameters.

keywordThese parameters are passed as keyword arguments, or as a single dict in their place.

Returns

string

String

str

Examples

javascript
normalizeFile('안녕하세요Hello.txt', 'NFC'); // '안녕하세요Hello.txt'
normalizeFile('안녕하세요Hello.txt', 'NFD'); // '안녕하세요Hello.txt'
dart
normalizeFile('안녕하세요Hello.txt', normalizationForm: 'NFC'); // '안녕하세요Hello.txt'
normalizeFile('안녕하세요Hello.txt', normalizationForm: 'NFD'); // '안녕하세요Hello.txt'
python
normalizeFile('안녕하세요Hello.txt', 'NFC') # '안녕하세요Hello.txt'
normalizeFile('안녕하세요Hello.txt', 'NFD') # '안녕하세요Hello.txt'

Released under the MIT License