Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Count () and strlen ()

Shulou Source: shulou.com Published: 2022-06-01 09:55:07 11月26日 Update

1. Count () function

The count () function returns the length of the array (the number of elements).

Example 1:

The running result of the program is: 3

Example 2:

The running result of the program is: 1

Second, strlen () function

The strlen () function returns the length of the string.

Return value: the length of the string is returned if successful, and 0 if the string is empty.

Example 1:

The running result of the program is: 8

Example 2:

The running result of the program is: 16

Tags: Function program result run character string length success element array quantity Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi macOS OPPO Reno Apple Docker