mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.2.4 PrintString
This commit is contained in:
parent
f196e5164d
commit
dfd79695d1
@ -6,11 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.2.4] - 2023-11-15
|
||||
- update readme.md
|
||||
|
||||
|
||||
## [0.2.3] - 2022-11-22
|
||||
- add changelog.md
|
||||
- add RP2040 to build-CI
|
||||
-
|
||||
|
||||
|
||||
## [0.2.2] - 2021-12-24
|
||||
- update library.json
|
||||
|
@ -2,8 +2,8 @@
|
||||
//
|
||||
// FILE: PrintString.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.3
|
||||
// PURPOSE: Class that captures prints into a String
|
||||
// VERSION: 0.2.4
|
||||
// PURPOSE: Class that captures prints into a String
|
||||
// DATE: 2017-12-09
|
||||
// URL: https://github.com/RobTillaart/PrintString
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "Print.h"
|
||||
|
||||
|
||||
#define PRINTSTRING_VERSION (F("0.2.3"))
|
||||
#define PRINTSTRING_VERSION (F("0.2.4"))
|
||||
|
||||
|
||||
class PrintString: public Print
|
||||
@ -47,12 +47,16 @@ public:
|
||||
}
|
||||
|
||||
|
||||
String getString() { return buffer; }
|
||||
String getString()
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
String buffer;
|
||||
};
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -2,8 +2,11 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/PrintString/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/PrintString/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/PrintString/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/PrintString/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/PrintString/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/PrintString.svg)](https://github.com/RobTillaart/PrintString/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/PrintString/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/PrintString.svg?maxAge=3600)](https://github.com/RobTillaart/PrintString/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/PrintString.svg)](https://registry.platformio.org/libraries/robtillaart/PrintString)
|
||||
|
||||
|
||||
# PrintString
|
||||
@ -22,13 +25,20 @@ This String can be requested to process later.
|
||||
use to prevent "display line overflow"
|
||||
(e.g. floats)
|
||||
|
||||
This library is related to
|
||||
- https://github.com/RobTillaart/PrintCharArray
|
||||
- https://github.com/RobTillaart/PrintSize.
|
||||
|
||||
#### Related
|
||||
|
||||
- https://github.com/RobTillaart/PrintCharArray (captures data in a char buffer)
|
||||
- https://github.com/RobTillaart/PrintSize (counts length of a number of print commands)
|
||||
- https://github.com/RobTillaart/PrintString (captures data in a String)
|
||||
|
||||
|
||||
## Interface
|
||||
|
||||
```cpp
|
||||
#include "PrintString.h"
|
||||
```
|
||||
|
||||
- **PrintString()** constructor.
|
||||
- **size_t write(uint8_t c)** workhorse I of Print interface.
|
||||
- **size_t write(uint8_t \* str, uint8_t length)** workhorse II of Print interface.
|
||||
@ -44,10 +54,31 @@ See examples.
|
||||
|
||||
## Future
|
||||
|
||||
#### Must
|
||||
|
||||
- documentation
|
||||
|
||||
#### Should
|
||||
|
||||
- testing
|
||||
- examples
|
||||
- add new ones
|
||||
- rename examples
|
||||
- add functions like **repeat(char c)** to inject e.g. 7 spaces etc.
|
||||
- add error flag
|
||||
-
|
||||
|
||||
#### Could
|
||||
|
||||
- PRINTSTRING_LIB_VERSION
|
||||
|
||||
#### Wont
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
If you appreciate my libraries, you can support the development and maintenance.
|
||||
Improve the quality of the libraries by providing issues and Pull Requests, or
|
||||
donate through PayPal or GitHub sponsors.
|
||||
|
||||
Thank you,
|
||||
|
||||
|
@ -51,5 +51,5 @@ void loop()
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/PrintString.git"
|
||||
},
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"headers": "PrintString.h"
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
name=PrintString
|
||||
version=0.2.3
|
||||
version=0.2.4
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Library to capture prints into a String.
|
||||
paragraph=
|
||||
paragraph=
|
||||
category=Data Processing
|
||||
url=https://github.com/RobTillaart/Arduino/tree/master/libraries
|
||||
architectures=*
|
||||
|
Loading…
Reference in New Issue
Block a user