【问题标题】:How to get the second word in string in emacs lisp?如何在emacs lisp中获取字符串中的第二个单词?
【发布时间】:2021-01-11 07:51:27
【问题描述】:

(message %s) > "富吧"

如何只打印“bar”?

【问题讨论】:

    标签: elisp


    【解决方案1】:

    先拆分字符串,然后从结果列表中抓取你想要的元素:

    (message "%s" (nth 1 (split-string "foo bar")))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多