






"""simple docstring"""


def       snake_case  (A_				:str				):







  '''simple docstring'''

  a					:      Optional[int]    =       [0] * len(A_				)

  for i in range(1     ,      len(A_				)				):
    # use last results for better performance - dynamic programming
    a					:      str    =       prefix_result[i - 1]
    while j > 0 and input_string[i] != input_string[j]:
      a					:      str    =       prefix_result[j - 1]

    if input_string[i] == input_string[j]:
      j += 1
    a					:      Optional[Any]    =       j

  return prefix_result




def       snake_case  (A_				:str				):







  '''simple docstring'''

  return max(prefix_function(A_				)				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()












"""simple docstring"""


def       snake_case  (A_				:str     ,      A_				:bool = False				):







  '''simple docstring'''

  if not isinstance(A_     ,      A_				):
    a					:      Union[str, Any]    =       f'''Expected string as input, found {type(A_				)}'''
    raise ValueError(A_				)
  if not isinstance(A_     ,      A_				):
    a					:      Optional[int]    =       f'''Expected boolean as use_pascal parameter, found {type(A_				)}'''
    raise ValueError(A_				)

  a					:      Tuple    =       input_str.split('_'				)

  a					:      Dict    =       0 if use_pascal else 1

  a					:      int    =       words[start_index:]

  a					:      int    =       [word[0].upper() + word[1:] for word in words_to_capitalize]

  a					:      List[str]    =       '' if use_pascal else words[0]

  return "".join([initial_word, *capitalized_words]				)


if __name__ == "__main__":
   from doctest import testmod

   testmod()




