# Function Reference

# _WinAPI_StringLenA

Calculates the size of ANSI string

#include <WinAPIMisc.au3>
_WinAPI_StringLenA ( Const ByRef $tString )

## Parameters

$tString | String Structure to process

## Return Value

Success: | String length in characters
Failure: | 0

## Remarks

Returned length does not include terminating null character.

## Related

_WinAPI_StringLenW

## See Also

Search lstrlenA in MSDN Library.

## Example

    #include <MsgBoxConstants.au3>
    #include <WinAPIMisc.au3>

    _Example()

    Func _Example()
        ; Make the string buffer. It's "char" type structure. Choosing the size of 64 characters.
        Local $tStringBuffer = DllStructCreate("char Data[64]")
        ; Fill it with some data
        DllStructSetData($tStringBuffer, "Data", "Callipygian")

        MsgBox($MB_SYSTEMMODAL, "_WinAPI_StringLenA", "Length of a string inside the buffer is " & _WinAPI_StringLenA($tStringBuffer) & " characters.")
    EndFunc   ;==>_Example