- Learning Rust
- Paul Johnson Vesa Kaihlavirta
- 81字
- 2021-07-02 23:07:21
Controlling the output formatting
The std::fmt module provides the developer with a range of utilities for formatting and printing strings. Let's start with the format! macro. This macro returns a string.
We have seen that if we use println!(Hello {}, myString), the code will print the contents of myString after the Hello. The format! macro works pretty much the same, just that it returns the formatted string instead of outputting it. In fact, println! essentially uses format! itself under the hood.
推薦閱讀
- 數據結構(Python語言描述)(第2版)
- Internet of Things with Intel Galileo
- Java 11 Cookbook
- AppInventor實踐教程:Android智能應用開發前傳
- Azure Serverless Computing Cookbook
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Python Interviews
- GitHub入門與實踐
- Mockito Essentials
- Learning Nessus for Penetration Testing
- 小程序從0到1:微信全棧工程師一本通
- JavaScript程序設計實例教程(第2版)
- MATLAB從入門到精通
- Image Processing with ImageJ(Second Edition)
- 軟件測試