WPILibC++ 2024.3.2
wpi::java::JStringRef Class Reference

Java string (jstring) reference. More...

#include <wpi/jni_util.h>

Public Member Functions

 JStringRef (JNIEnv *env, jstring str)
 
 operator std::string_view () const
 
std::string_view str () const
 
const char * c_str () const
 
size_t size () const
 

Detailed Description

Java string (jstring) reference.

The string is provided as UTF8. This is not actually a reference, as it makes a copy of the string characters, but it's named this way for consistency.

Constructor & Destructor Documentation

◆ JStringRef()

wpi::java::JStringRef::JStringRef ( JNIEnv *  env,
jstring  str 
)
inline

Member Function Documentation

◆ c_str()

const char * wpi::java::JStringRef::c_str ( ) const
inline

◆ operator std::string_view()

wpi::java::JStringRef::operator std::string_view ( ) const
inline

◆ size()

size_t wpi::java::JStringRef::size ( ) const
inline

◆ str()

std::string_view wpi::java::JStringRef::str ( ) const
inline

The documentation for this class was generated from the following file: