Skip to content

StrFirst

Description

Access the first character of the string by value. Caller must ensure the string is non-empty.

Parameters

Name Direction Description
str in String to query.

Usage example (Cross-references)

Usage examples (Cross-references)
    // Test StrFirst function
    bool test_str_first(void) {
        WriteFmt("Testing StrFirst\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        // Get the first character
        char first = StrFirst(&s);
    
        // Check that the character is correct
Last updated on