Test to count number of Characters


I need a test to count number of characters for a specific field in the request

i have an IP address in the Request which is 19 Characters, i just want to know how to create a test counting the individual characters.

My request body:

details": {
“client_reference”: “xxxxxx”,
“ip_address”: “”,

Any Idea’s??