如何“URL解码” Emacs Lisp中的一个字符串? [英] How to "URL decode" a string in Emacs Lisp?

查看:115
本文介绍了如何“URL解码” Emacs Lisp中的一个字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字符串,如foo%20bar,我想要foo bar。



我知道在Emacs Lisp中解码URL编码的字符串(查询字符串)必须是一个内置函数,但是对于我来说,有没有人会记得这个叫什么?

解决方案

org-link-unescape 为非常简单的案例做这个工作... w3m-url-decode -string 更好,但它并没有内置,我本地的版本不能与Emacs 23工作。


I've got a string like "foo%20bar" and I want "foo bar" out of it.

I know there's got to be a built-in function to decode a URL-encoded string (query string) in Emacs Lisp, but for the life of me I can't find it today, either in my lisp/ folder or with google.

Anybody remember what it's called?

解决方案

org-link-unescape does the job for very simple cases ... w3m-url-decode-string is better, but it isn't built in and the version I have locally isn't working with Emacs 23.

这篇关于如何“URL解码” Emacs Lisp中的一个字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆