初稿: 2018-08-09 Thu 14:03
最終更新日: 2018-12-14 Fri 20:44
ホーム | 文書トップ | 目次

org-unbracket-string
文字列から先頭と末尾の指定文字列を削除する

1: (defun org-unbracket-string (pre post string)
2:   "Remove PRE/POST from the beginning/end of STRING.
3: Both PRE and POST must be pre-/suffixes of STRING, or neither is
4: removed."
5:   (if (and (string-prefix-p pre string)
6:            (string-suffix-p post string))
7:       (substring string (length pre) (- (length post)))
8:     string))

日付: 2018-08-09 Thu 14:03

著者: conao

Created: 2018-12-14 Fri 21:04

Validate