diff options
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r-- | src/string_immutable.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 7c2b61c03..29b692ffb 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -3974,6 +3974,14 @@ pub fn isIPAddress(input: []const u8) bool { } } +pub fn isIPV6Address(input: []const u8) bool { + if (std.net.Address.parseIp6(input, 0)) |_| { + return true; + } else |_| { + return false; + } +} + pub fn cloneNormalizingSeparators( allocator: std.mem.Allocator, input: []const u8, |