def get_index_str(n, i):
    """
    To convert an int 'i' to a string.

    Parameters
    ----------
    n : int
        Order to put 0 if necessary.

    i : int
        The number to convert.

    Returns
    -------
    res : str
        The number as a string.

    Examples
    --------
    ```python
        getIndexStr(100,15)
    ```

    Out:

    ```
        '015'
    ```
    """
    if i < 0 or i > n:
        raise ValueError("N >= i or i > 0 is required")
    lm = len(str(n))
    res = str(i)
    while lm > len(res):
        res = "0" + res
    return res