Skip to content

Commit 9e7a1bb

Browse files
authored
Merge pull request #124 from RobLoach/readme-update
Update README.md
2 parents 1d40681 + 1e1e51d commit 9e7a1bb

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
![raylib-cpp Logo](projects/Doxygen/raylib-cpp_256x256.png)
22

3-
# raylib-cpp [![Tests](https://github.com/RobLoach/raylib-cpp/workflows/Tests/badge.svg)](https://github.com/RobLoach/raylib-cpp/actions?query=workflow%3ATests+branch%3Amaster)
3+
# raylib-cpp [![Tests](https://github.com/RobLoach/raylib-cpp/workflows/Tests/badge.svg)](https://github.com/RobLoach/raylib-cpp/actions?query=workflow%3ATests+branch%3Amaster) [![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE)
44

5-
*raylib-cpp* is a C++ wrapper library for [raylib](https://www.raylib.com/), a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces.
5+
[raylib-cpp](https://github.com/robloach/raylib-cpp) is a C++ wrapper library for [raylib](https://www.raylib.com), a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around *raylib*'s struct interfaces.
66

77
## Example
88

@@ -210,6 +210,22 @@ for (auto& file : files) {
210210
}
211211
```
212212

213+
### String Functions
214+
215+
Many of the raylib functions have `std::string`-related functions to allow calling them directly with `std::string`s to save having to use the `.c_str()` method.
216+
217+
``` cpp
218+
// raylib
219+
const char* url = "https://raylib.com";
220+
OpenURL(url);
221+
222+
// raylib-cpp
223+
std::string url = "https://raylib.com";
224+
raylib::OpenURL(url);
225+
OpenURL(url.c_str()); // Alternatively
226+
```
227+
228+
213229
### RayMath
214230
215231
The [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) methods are included.
@@ -283,3 +299,7 @@ cpplint --recursive include
283299
### Defines
284300
285301
- `RAYLIB_CPP_NO_MATH` - When set, will skip adding the `raymath.h` integrations
302+
303+
## License
304+
305+
raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.

0 commit comments

Comments
 (0)