Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit da6325d

Browse files
authored
Added isKey and getType methods to the documentation (#9111)
1 parent 429a72b commit da6325d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

‎docs/en/api/preferences.rst‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,45 @@ Arduino-esp32 Preferences API
177177

178178
**Note**
179179
* A message providing the reason for a failed call is sent to the arduino-esp32 ``log_e`` facility.
180+
181+
182+
``isKey``
183+
*************
184+
185+
Check if a key-value pair from the currently open namespace exists.
186+
187+
.. code-block:: arduino
188+
189+
bool isKey(const char * key)
190+
..
191+
192+
**Parameters**
193+
* ``key`` (Required)
194+
- the name of the key to be checked.
195+
196+
**Returns**
197+
* ``true`` if key-value pair exists; ``false`` otherwise.
198+
199+
**Note**
200+
* Attempting to check a key without a namespace being open will return false.
201+
202+
203+
``getType``
204+
*************
205+
206+
Returns the type of a key-value pair from the currently open namespace.
207+
208+
.. code-block:: arduino
209+
210+
PreferenceType getType(const char * key)
211+
..
212+
213+
**Parameters**
214+
* ``key`` (Required)
215+
- the name of the key to be checked.
216+
217+
**Returns**
218+
* PreferenceType element contaning the type of the key-value pair or PT_INVALID on error.
180219

181220

182221
``putChar, putUChar``

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /