Skip to content

isAddress

Definition

Checks if a given string is an ethereum address.

Usage

It takes 1 argument.

  • the string to check.
const not_address = "No";
const utils = @import(zabi).utils;
const std = @import("std");
 
// This will allocate because it will checksum to make sure
// that the address is valid.
try utils.isAddress(std.testing.allocator, not_address); 
 
// Result
// false

Returns

Type: bool