```python
def common_prefix_util(str1, str2):
    """
    A utility function that finds the longest common prefix of two strings.
    """
    result = []
    # zip stops when the shorter of the two strings is exhausted
    for char1, char2 in zip(str1, str2):
        if char1 == char2:
            result.append(char1)
        else:
            break
    return "".join(result)

```