メインコンテンツまでスキップ

URI をエンコードする (string.encode_uri)

宣言

エンコード済み URI = string.encode_uri(URI)

パラメータ

  • URI
    文字列型。URI です

戻り値

  • エンコード済み URI
    文字列型。エンコードされた URI を返します

説明

URI 内の特殊文字をパーセントエンコード(percent-encoding)します
キーワード:URL エンコード、URI エンコード
この関数は 20250313 以降のバージョンで使用できます

使用例

nLog(string.encode_uri("https://www.example.com/测试")) -- https://www.example.com/%E6%B5%8B%E8%AF%95