Skip to content

normalizeFile

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

Returns the file name within the path.

Parameters

NameTypeRequiredDefault
filePathstring
File or directory path
normalizationFormnamed'NFC' | 'NFD' | 'NFKC' | 'NFKD'
Normalization method (If value is undefined, NFC is used.)

named parameters are passed as named parameters in Dart and keyword arguments in Python.

Returns

string

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