Skip to content

Commit 28b082c

Browse files
authored
Cleanup documentation (#4667)
* Cleanup documentation * Fix comment typo in fmt::formatter struct * Fix formatting and grammar in api.md Corrected formatting and grammar in the API documentation.
1 parent 2eda43e commit 28b082c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

doc/api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies for better compile times. This header is only beneficial when
2828
using {fmt} as a library (the default) and not in the header-only mode.
2929
It also provides `formatter` specializations for the following types:
3030

31-
- `int`, `long long`,
31+
- `int`, `long long`
3232
- `unsigned`, `unsigned long long`
3333
- `float`, `double`, `long double`
3434
- `bool`
@@ -105,8 +105,8 @@ Example ([run](https://godbolt.org/z/nvME4arz8)):
105105
fmt::print("{}\n", kevin_namespacy::film::se7en); // Output: 7
106106
}
107107

108-
Using specialization is more complex but gives you full control over
109-
parsing and formatting. To use this method specialize the `formatter`
108+
Using a specialization is more complex, but gives you full control over
109+
parsing and formatting. To use this method, specialize the `formatter`
110110
struct template for your type and implement `parse` and `format`
111111
methods.
112112

@@ -515,7 +515,7 @@ chrono-format-specifications).
515515
516516
### Variants
517517
518-
A `std::variant` is only formattable if every variant alternative is
518+
A `std::variant` can be formatted only if every alternative is
519519
formattable, and requires the `__cpp_lib_variant` [library
520520
feature](https://en.cppreference.com/w/cpp/feature_test).
521521
@@ -719,7 +719,7 @@ configuring CMake.
719719
### CMake Options
720720

721721
- **`FMT_OS`**: When set to `OFF`, disables OS-specific APIs (`fmt/os.h`).
722-
- **`FMT_UNICODE`**: When set of `OFF`, disables Unicode support on
722+
- **`FMT_UNICODE`**: When set to `OFF`, disables Unicode support on
723723
Windows/MSVC. Unicode support is always enabled on other platforms.
724724

725725
### Macros

include/fmt/printf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
473473
}
474474

475475
auto arg = get_arg(arg_index);
476-
// For d, i, o, u, x, and X conversion specifiers, if a precision is
476+
// For d, i, o, u, x and X conversion specifiers, if a precision is
477477
// specified, the '0' flag is ignored
478478
if (specs.precision >= 0 && is_integral_type(arg.type())) {
479479
// Ignore '0' for non-numeric types or if '-' present.
@@ -586,7 +586,7 @@ inline auto vsprintf(basic_string_view<Char> fmt,
586586

587587
/**
588588
* Formats `args` according to specifications in `fmt` and returns the result
589-
* as as string.
589+
* as string.
590590
*
591591
* **Example**:
592592
*

0 commit comments

Comments
 (0)