Skip to content

Commit abc2a14

Browse files
authored
Merge pull request #473 from StatisMike/feature/file-access-wrapper
Add `GFile`, a wrapper for `FileAccess` implementing `std::io::*` traits
2 parents d96906f + 47bda99 commit abc2a14

File tree

7 files changed

+1110
-4
lines changed

7 files changed

+1110
-4
lines changed

godot-core/src/builtin/string/gstring.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ impl GString {
6868
Self { opaque }
6969
}
7070

71+
pub fn len(&self) -> usize {
72+
self.as_inner().length().try_into().unwrap()
73+
}
74+
75+
pub fn is_empty(&self) -> bool {
76+
self.as_inner().is_empty()
77+
}
78+
7179
/// Returns a 32-bit integer hash value representing the string.
7280
pub fn hash(&self) -> u32 {
7381
self.as_inner()

0 commit comments

Comments
 (0)