format
format
2023-09-14 08:58:45 时间
format
;;; ~:fall(nil) ~;pass(其他)
> (format t "~:[fall~;pass~] ... ~A~%" t "hello")
pass ... hello
NIL
> (format t "~:[fall~;pass~] ... ~A~%" nil "hello")
fall ... hello
格式化指令可以接受参数。 ~F
> (format nil "~4,2,0,'*,' F" 3.14123)
"3.14"
> (format nil "~,2F" 3.14123)
"3.14"
> (format nil "~,3F" 3.14123)
"3.141"
遍历表中的数据
~^ 表内没有剩余元素时,立即停止迭代
(setf a '(a b c))
(format t "~{~A~^, ~}" a) ;A, B, C
输出char
(format t "~c~%" #\a) ; a
(format t "~@c~%" #\a) ; #\a
相关文章
- C# String.Format用法和格式说明
- 【源码分析】FastJson全局配置日期格式导致@JSONField(format = "yyyy-MM-dd")注解失效
- format的用法:python
- [Python] Format Strings in Python
- [React Intl] Format a Date Relative to the Current Date Using react-intl FormattedRelative
- Python-format格式化输出(补充)
- SAP CRM WebClient UI Date time format in BSP UI
- string.Format
- Android问题笔记 - 新版Android Studio打包低版本Android项目出现Invalid keystore format
- “2021-01-30T16:00:00.000Z“: expected format “yyyy-MM-dd HH:mm:ss“时间戳格式化
- Python: 字符串格式化format()函数的使用
- Specified sample format -1 is invalid or not supported