aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig8
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,