diff --git a/docs/_font_8hpp_source.html b/docs/_font_8hpp_source.html index 8d0ca2f..092f8a1 100644 --- a/docs/_font_8hpp_source.html +++ b/docs/_font_8hpp_source.html @@ -224,7 +224,7 @@ $(function() {
raylib::Vector2
Vector2 type.
Definition: Vector2.hpp:16
raylib::Color
Color type, RGBA (32bit)
Definition: Color.hpp:14
raylib::Font::ImageText
inline ::Image ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:143
-
raylib::Texture
Texture type.
Definition: Texture.hpp:15
+
raylib::Texture
Texture type.
Definition: Texture.hpp:16
raylib::Font::MeasureText
Vector2 MeasureText(const std::string &text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:129
raylib::DrawTextEx
static void DrawTextEx(const Font &font, const std::string &text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:256
diff --git a/docs/_functions_8hpp_source.html b/docs/_functions_8hpp_source.html index 473a283..b893542 100644 --- a/docs/_functions_8hpp_source.html +++ b/docs/_functions_8hpp_source.html @@ -251,60 +251,69 @@ $(function() {
288 }
289 
293 RLAPI inline std::string TextSubtext(const std::string& text, int position, int length) {
-
294  return TextSubtext(text.c_str(), position, length);
+
294  return ::TextSubtext(text.c_str(), position, length);
295 }
296 
300 RLAPI inline std::string TextReplace(const std::string& text, const std::string& replace, const std::string& by) {
-
301  return TextReplace(text.c_str(), replace.c_str(), by.c_str());
-
302 }
-
303 
-
307 RLAPI inline std::string TextInsert(const std::string& text, const std::string& insert, int position) {
-
308  return TextInsert(text.c_str(), insert.c_str(), position);
+
301  const char* input = text.c_str();
+
302  char* output = ::TextReplace(const_cast<char*>(input), replace.c_str(), by.c_str());
+
303  if (output != NULL) {
+
304  std::string stringOutput(output);
+
305  free(output);
+
306  return stringOutput;
+
307  }
+
308  return "";
309 }
310 
-
314 RLAPI inline void TextAppend(const std::string& text, const std::string& append, int *position) {
-
315  return TextAppend(text.c_str(), append.c_str(), position);
-
316 }
-
317 
-
321 RLAPI inline int TextFindIndex(const std::string& text, const std::string& find) {
-
322  return TextFindIndex(text.c_str(), find.c_str());
-
323 }
-
324 
-
328 RLAPI inline std::string TextToUpper(const std::string& text) {
-
329  return TextToUpper(text.c_str());
-
330 }
-
331 
-
335 RLAPI inline std::string TextToLower(const std::string& text) {
-
336  return TextToLower(text.c_str());
-
337 }
-
338 
-
342 RLAPI inline std::string TextToPascal(const std::string& text) {
-
343  return TextToPascal(text.c_str());
-
344 }
-
345 
-
349 RLAPI inline int TextToInteger(const std::string& text) {
-
350  return TextToInteger(text.c_str());
-
351 }
-
352 
-
353 } // namespace raylib
-
354 
-
355 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
314 RLAPI inline std::string TextInsert(const std::string& text, const std::string& insert, int position) {
+
315  char* output = ::TextInsert(text.c_str(), insert.c_str(), position);
+
316  if (output != NULL) {
+
317  std::string stringOutput(output);
+
318  free(output);
+
319  return stringOutput;
+
320  }
+
321  return "";
+
322 }
+
323 
+
327 RLAPI inline int TextFindIndex(const std::string& text, const std::string& find) {
+
328  return ::TextFindIndex(text.c_str(), find.c_str());
+
329 }
+
330 
+
334 RLAPI inline std::string TextToUpper(const std::string& text) {
+
335  return ::TextToUpper(text.c_str());
+
336 }
+
337 
+
341 RLAPI inline std::string TextToLower(const std::string& text) {
+
342  return ::TextToLower(text.c_str());
+
343 }
+
344 
+
348 RLAPI inline std::string TextToPascal(const std::string& text) {
+
349  return ::TextToPascal(text.c_str());
+
350 }
+
351 
+
355 RLAPI inline int TextToInteger(const std::string& text) {
+
356  return ::TextToInteger(text.c_str());
+
357 }
+
358 
+
359 } // namespace raylib
+
360 
+
361 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
-
raylib::TextToPascal
RLAPI std::string TextToPascal(const std::string &text)
Get Pascal case notation version of provided string.
Definition: Functions.hpp:342
+
raylib::TextToPascal
RLAPI std::string TextToPascal(const std::string &text)
Get Pascal case notation version of provided string.
Definition: Functions.hpp:348
raylib
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:7
raylib::LoadImage
static inline ::Image LoadImage(const std::string &fileName)
Load an image.
Definition: Functions.hpp:203
raylib::GetFileName
static std::string GetFileName(const std::string &filePath)
Get pointer to filename for a path string.
Definition: Functions.hpp:112
raylib::UpdateCamera
static void UpdateCamera(const ::Camera &camera)
Update camera depending on selected mode.
Definition: Functions.hpp:195
-
raylib::TextFindIndex
RLAPI int TextFindIndex(const std::string &text, const std::string &find)
Find first text occurrence within a string.
Definition: Functions.hpp:321
+
raylib::TextFindIndex
RLAPI int TextFindIndex(const std::string &text, const std::string &find)
Find first text occurrence within a string.
Definition: Functions.hpp:327
raylib::LoadImageRaw
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load an image from RAW file data.
Definition: Functions.hpp:210
raylib::GetPrevDirectoryPath
static std::string GetPrevDirectoryPath(const std::string &dirPath)
Get previous directory path for a given path.
Definition: Functions.hpp:133
raylib::TextIsEqual
static bool TextIsEqual(const std::string &text1, const std::string &text2)
Check if two text string are equal.
Definition: Functions.hpp:279
raylib::LoadImageFromMemory
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension like "png".
Definition: Functions.hpp:226
raylib::SetWindowTitle
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:31
-
raylib::Image
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:15
+
raylib::Image
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:16
raylib::GetMonitorName
static std::string GetMonitorName(int monitor=0)
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition: Functions.hpp:38
raylib::LoadImageAnim
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Load animated image data.
Definition: Functions.hpp:219
-
raylib::TextToUpper
RLAPI std::string TextToUpper(const std::string &text)
Get upper case version of provided string.
Definition: Functions.hpp:328
+
raylib::TextToUpper
RLAPI std::string TextToUpper(const std::string &text)
Get upper case version of provided string.
Definition: Functions.hpp:334
raylib::GetFileModTime
static long GetFileModTime(const std::string &fileName)
Get file modification time (last write time)
Definition: Functions.hpp:181
raylib::TakeScreenshot
static void TakeScreenshot(const std::string &fileName)
Takes a screenshot of current screen (saved a .png)
Definition: Functions.hpp:59
raylib::GetDroppedFiles
static std::vector< std::string > GetDroppedFiles()
Get dropped files names.
Definition: Functions.hpp:167
@@ -324,22 +333,21 @@ $(function() {
raylib::ChangeDirectory
static bool ChangeDirectory(const std::string &dir)
Change working directory, return true on success.
Definition: Functions.hpp:159
raylib::Vector2
Vector2 type.
Definition: Vector2.hpp:16
raylib::MeasureText
static int MeasureText(const std::string &text, int fontSize)
Measure string width for default font.
Definition: Functions.hpp:272
-
raylib::TextReplace
RLAPI std::string TextReplace(const std::string &text, const std::string &replace, const std::string &by)
Replace text string (WARNING: memory must be freed!)
Definition: Functions.hpp:300
+
raylib::TextReplace
RLAPI std::string TextReplace(const std::string &text, const std::string &replace, const std::string &by)
Replace text string.
Definition: Functions.hpp:300
raylib::SetClipboardText
static void SetClipboardText(const std::string &text)
Set clipboard text content.
Definition: Functions.hpp:45
raylib::Color
Color type, RGBA (32bit)
Definition: Color.hpp:14
raylib::GetFileExtension
static std::string GetFileExtension(const std::string &fileName)
Get pointer to extension for a filename string (including point: ".png")
Definition: Functions.hpp:105
raylib::SaveFileText
static bool SaveFileText(const std::string &fileName, const std::string &text)
Save text data to file (write)
Definition: Functions.hpp:77
-
raylib::TextToLower
RLAPI std::string TextToLower(const std::string &text)
Get lower case version of provided string.
Definition: Functions.hpp:335
+
raylib::TextToLower
RLAPI std::string TextToLower(const std::string &text)
Get lower case version of provided string.
Definition: Functions.hpp:341
raylib::DrawText
static void DrawText(const std::string &text, int posX, int posY, int fontSize, ::Color color)
Draw text (using default font)
Definition: Functions.hpp:249
raylib::LoadFileText
static std::string LoadFileText(const std::string &fileName)
Load text data from file (read)
Definition: Functions.hpp:67
raylib::OpenURL
static void OpenURL(const std::string &url)
Open URL with default system browser (if available)
Definition: Functions.hpp:188
raylib::TextLength
static unsigned int TextLength(const std::string &text)
Check if two text string are equal.
Definition: Functions.hpp:286
raylib::DrawTextEx
static void DrawTextEx(const Font &font, const std::string &text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:256
-
raylib::TextAppend
RLAPI void TextAppend(const std::string &text, const std::string &append, int *position)
Append text at specific position and move cursor!
Definition: Functions.hpp:314
raylib::GetWorkingDirectory
static std::string GetWorkingDirectory()
Get current working directory.
Definition: Functions.hpp:140
-
raylib::TextInsert
RLAPI std::string TextInsert(const std::string &text, const std::string &insert, int position)
Insert text in a position (WARNING: memory must be freed!)
Definition: Functions.hpp:307
+
raylib::TextInsert
RLAPI std::string TextInsert(const std::string &text, const std::string &insert, int position)
Insert text in a position.
Definition: Functions.hpp:314
raylib::GetClipboardText
static std::string GetClipboardText()
Get clipboard text content.
Definition: Functions.hpp:52
-
raylib::TextToInteger
RLAPI int TextToInteger(const std::string &text)
Get integer value from text (negative values not supported)
Definition: Functions.hpp:349
+
raylib::TextToInteger
RLAPI int TextToInteger(const std::string &text)
Get integer value from text (negative values not supported)
Definition: Functions.hpp:355