




def    UpperCAmelCase_				( __UpperCAmelCase		:      str				)   ->					list[int]:
      SCREAMING_SNAKE_CASE_      		=     [0 for i in range(len(__lowerCAmelCase				)				)]

      # initialize interval's left pointer and right pointer
      SCREAMING_SNAKE_CASE_		,					SCREAMING_SNAKE_CASE_      		=     0, 0

      for i in range(1     ,     len(__lowerCAmelCase				)				):
            # case when current index is inside the interval
            if i <= right_pointer:
                  SCREAMING_SNAKE_CASE_      		=     min(right_pointer - i + 1     ,     z_result[i - left_pointer]				)
                  SCREAMING_SNAKE_CASE_      		=     min_edge

            while go_next(__lowerCAmelCase     ,     __lowerCAmelCase     ,     __lowerCAmelCase				):
                  z_result[i] += 1

            # if new index's result gives us more right interval,
            # we've to update left_pointer and right_pointer
            if i + z_result[i] - 1 > right_pointer:
                  SCREAMING_SNAKE_CASE_		,					SCREAMING_SNAKE_CASE_      		=     i, i + z_result[i] - 1

      return z_result

def    UpperCAmelCase_				( __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      list[int]     ,     __UpperCAmelCase		:      str				)   ->					bool:
      return i + z_result[i] < len(__lowerCAmelCase				) and s[z_result[i]] == s[i + z_result[i]]

def    UpperCAmelCase_				( __UpperCAmelCase		:      str     ,     __UpperCAmelCase		:      str				)   ->					int:
      SCREAMING_SNAKE_CASE_      		=     0
      # concatenate 'pattern' and 'input_str' and call z_function
      # with concatenated string
      SCREAMING_SNAKE_CASE_      		=     z_function(pattern + input_str				)

      for val in z_result:
            # if value is greater then length of the pattern string
            # that means this index is starting position of substring
            # which is equal to pattern string
            if val >= len(__lowerCAmelCase				):
                  answer += 1

      return answer


if __name__ == "__main__":
   import doctest

   doctest.testmod()






'''simple docstring'''




import re





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str		)		->  list:
   return [char.split() for char in re.split(r"""[^ a-z A-Z 0-9 \s]"""      ,    str_		)]





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str		)		->  str:
   snake_case 						=   split_input(str_		)
   return "".join(
       ["""""".join([char.capitalize() for char in sub_str]		) for sub_str in string_split]		)





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str      ,    __lowerCAmelCase       :							bool      ,    __lowerCAmelCase       :							str		)		->  str:
   try:
      snake_case 						=   split_input(__lowerCAmelCase		)
      if upper:
         snake_case 						=   """""".join(
             [
                 separator.join([char.upper() for char in sub_str]		)
                 for sub_str in string_split
             ]		)
      else:
         snake_case 						=   """""".join(
             [
                 separator.join([char.lower() for char in sub_str]		)
                 for sub_str in string_split
             ]		)
      return res_str
   except IndexError:
      return "not valid string"





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str		)		->  str:
   return to_simple_case(__lowerCAmelCase		)





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str		)		->  str:
   try:
      snake_case 						=   to_simple_case(__lowerCAmelCase		)
      return res_str[0].lower() + res_str[1:]
   except IndexError:
      return "not valid string"





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str      ,    __lowerCAmelCase       :							bool		)		->  str:
   return to_complex_case(__lowerCAmelCase      ,    __lowerCAmelCase      ,    """_"""		)





def 	__lowerCamelCase			(      __lowerCAmelCase       :							str      ,    __lowerCAmelCase       :							bool		)		->  str:
   return to_complex_case(__lowerCAmelCase      ,    __lowerCAmelCase      ,    """-"""		)


if __name__ == "__main__":
 __import__("doctest").testmod()

