Share this page

# strlwr

String Manipulation Functions

Converts a string to lower case.

    char *strlwr( char *string);

string | The string whose characters are converted to lower case.

## Return Values

Returns the string in lower case.

## Example

In this example, the group name of a Vuser is converted to lower case. However, lr_whoami returns the group name as a static buffer and such buffers cannot be manipulated with. If manipulation is required, a copy of the static buffer must be created.

strdup creates a copy of the static buffer, groupname_static. The characters in the new buffer, groupname, arethen converted to lower case with strlwr.

        #include <string.h>

        int id;
        char * groupname_static, * groupname;

    // Get the groupname from VuGen

        lr_whoami (&id, &groupname_static, NULL);
        lr_output_message ("groupname=%s", groupname_static);

    // Make a copy of groupname_static so we can change it

        groupname = (char *)strdup(groupname_static);
        groupname = (char *)strlwr(groupname);
        lr_output_message ("lower case groupname=%s", groupname);
        free(groupname);

    Example: Output:
    Action.c(8): groupname=None
    Action.c(14): lower case groupname=none

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: