Return a pointer to the underlying @ref string. If `this->kind() == kind::string`, returns a pointer to the underlying object. Otherwise, returns `nullptr`. @par Example The return value is used in both a boolean context and to assign a variable: @code if( auto p = jv.if_string() ) return *p; @endcode @par Compl
| 1477 | @{ |
| 1478 | */ |
| 1479 | string const* |
| 1480 | if_string() const noexcept |
| 1481 | { |
| 1482 | if(kind() == json::kind::string) |
| 1483 | return &str_; |
| 1484 | return nullptr; |
| 1485 | } |
| 1486 | |
| 1487 | string* |
| 1488 | if_string() noexcept |
no test coverage detected