-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
165 changed files
with
348,175 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,13 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
# Ignore everything | ||
* | ||
!*/ | ||
# Except these | ||
!.gitignore | ||
!*.ixx | ||
!*.h | ||
!*.hpp | ||
!*.c | ||
!*.cpp | ||
!*.lib | ||
# Ignore these modules | ||
modules/ai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
# null | ||
# Null | ||
A cross-platform C++20/C++23 module-only library with many useful features. Just drag and drop! It's that easy. | ||
|
||
# How to use | ||
1. Make sure you set your compiler's language standard to C++20/C++23 or higher. | ||
2. Clone the repository anywhere inside your project, for example, in a directory named `dependencies`. | ||
```bash | ||
MyProject\dependencies> git clone https://github.com/Beyondo/null | ||
``` | ||
3. Enjoy using modules in C++! | ||
|
||
**For Visual Studio:** | ||
- Make sure to click on "Show All Files" icon then click on refresh icon. | ||
- Right click on `dependencies` or `dependencies/null` directory and click "Include In Project". | ||
|
||
|
||
# Importing notes | ||
- All library modules are prefixed by `null.[module_name]`. | ||
- All library modules are in the namespace `null::`. | ||
- This library was coded so that Intellisense would always work fine with it. | ||
# Available modules | ||
- `null.filterable` | ||
- `null.clipboard` | ||
- `null.window` | ||
- `null.graphics` | ||
- `null.vulkan` | ||
- `null.math` | ||
- `null.meta` | ||
|
||
# Notes: | ||
If you found this library useful, or at least a good helpful example of how next-gen libraries of C++23 modules should be like, then pleaes consider starring it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export module null.algorithm.string; | ||
import <vector>; | ||
import <string>; | ||
export namespace null | ||
{ | ||
inline auto split(const std::string& str, char delim) -> std::vector<std::string> | ||
{ | ||
std::vector<std::string> parts; | ||
std::string part; | ||
for (auto i = 0; i < str.length(); i++) | ||
{ | ||
if (str[i] == delim) | ||
{ | ||
parts.push_back(part); | ||
part.clear(); | ||
} | ||
else | ||
part += str[i]; | ||
} | ||
parts.push_back(part); | ||
return parts; | ||
} | ||
inline void split(const std::string& str, char delim, std::vector<std::string>& parts) | ||
{ | ||
std::string part; | ||
for (auto i = 0; i < str.length(); i++) | ||
{ | ||
if (str[i] == delim) | ||
{ | ||
parts.push_back(part); | ||
part.clear(); | ||
} | ||
else | ||
part += str[i]; | ||
} | ||
parts.push_back(part); | ||
} | ||
} |
Oops, something went wrong.