@[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs icu-uc icu-i18n icu-io 2> /dev/null|| printf %s '-licuio -licui18n -licuuc -licudata'`")]
lib LibICU
  {% begin %}
  fun uregex_append_replacement = uregex_appendReplacement{{SYMS_SUFFIX.id}}(regexp : URegularExpression, replacement_text : UChar*, replacement_length : Int32T, dest_buf : UChar**, dest_capacity : Int32T*, status : UErrorCode*) : Int32T
  fun uregex_append_replacement_u_text = uregex_appendReplacementUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, replacement_text : UText*, dest : UText*, status : UErrorCode*)
  fun uregex_append_tail = uregex_appendTail{{SYMS_SUFFIX.id}}(regexp : URegularExpression, dest_buf : UChar**, dest_capacity : Int32T*, status : UErrorCode*) : Int32T
  fun uregex_append_tail_u_text = uregex_appendTailUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, dest : UText*, status : UErrorCode*) : UText*
  fun uregex_clone = uregex_clone{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : URegularExpression
  fun uregex_close = uregex_close{{SYMS_SUFFIX.id}}(regexp : URegularExpression)
  fun uregex_end64 = uregex_end64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_num : Int32T, status : UErrorCode*) : Int64T
  fun uregex_end = uregex_end{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_num : Int32T, status : UErrorCode*) : Int32T
  fun uregex_find64 = uregex_find64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, start_index : Int64T, status : UErrorCode*) : UBool
  fun uregex_find = uregex_find{{SYMS_SUFFIX.id}}(regexp : URegularExpression, start_index : Int32T, status : UErrorCode*) : UBool
  fun uregex_find_next = uregex_findNext{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : UBool
  fun uregex_flags = uregex_flags{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int32T
  fun uregex_get_find_progress_callback = uregex_getFindProgressCallback{{SYMS_SUFFIX.id}}(regexp : URegularExpression, callback : (Void*, Int64T -> UBool)*, context : Void**, status : UErrorCode*)
  fun uregex_get_match_callback = uregex_getMatchCallback{{SYMS_SUFFIX.id}}(regexp : URegularExpression, callback : (Void*, Int32T -> UBool)*, context : Void**, status : UErrorCode*)
  fun uregex_get_stack_limit = uregex_getStackLimit{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int32T
  fun uregex_get_text = uregex_getText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, text_length : Int32T*, status : UErrorCode*) : UChar*
  fun uregex_get_time_limit = uregex_getTimeLimit{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int32T
  fun uregex_get_u_text = uregex_getUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, dest : UText*, status : UErrorCode*) : UText*
  fun uregex_group = uregex_group{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_num : Int32T, dest : UChar*, dest_capacity : Int32T, status : UErrorCode*) : Int32T
  fun uregex_group_count = uregex_groupCount{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int32T
  fun uregex_group_number_from_c_name = uregex_groupNumberFromCName{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_name : LibC::Char*, name_length : Int32T, status : UErrorCode*) : Int32T
  fun uregex_group_number_from_name = uregex_groupNumberFromName{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_name : UChar*, name_length : Int32T, status : UErrorCode*) : Int32T
  fun uregex_group_u_text = uregex_groupUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_num : Int32T, dest : UText*, group_length : Int64T*, status : UErrorCode*) : UText*
  fun uregex_has_anchoring_bounds = uregex_hasAnchoringBounds{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : UBool
  fun uregex_has_transparent_bounds = uregex_hasTransparentBounds{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : UBool
  fun uregex_hit_end = uregex_hitEnd{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : UBool
  fun uregex_looking_at64 = uregex_lookingAt64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, start_index : Int64T, status : UErrorCode*) : UBool
  fun uregex_looking_at = uregex_lookingAt{{SYMS_SUFFIX.id}}(regexp : URegularExpression, start_index : Int32T, status : UErrorCode*) : UBool
  fun uregex_matches64 = uregex_matches64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, start_index : Int64T, status : UErrorCode*) : UBool
  fun uregex_matches = uregex_matches{{SYMS_SUFFIX.id}}(regexp : URegularExpression, start_index : Int32T, status : UErrorCode*) : UBool
  fun uregex_open = uregex_open{{SYMS_SUFFIX.id}}(pattern : UChar*, pattern_length : Int32T, flags : Uint32T, pe : UParseError*, status : UErrorCode*) : URegularExpression
  fun uregex_open_c = uregex_openC{{SYMS_SUFFIX.id}}(pattern : LibC::Char*, flags : Uint32T, pe : UParseError*, status : UErrorCode*) : URegularExpression
  fun uregex_open_u_text = uregex_openUText{{SYMS_SUFFIX.id}}(pattern : UText*, flags : Uint32T, pe : UParseError*, status : UErrorCode*) : URegularExpression
  fun uregex_pattern = uregex_pattern{{SYMS_SUFFIX.id}}(regexp : URegularExpression, pat_length : Int32T*, status : UErrorCode*) : UChar*
  fun uregex_pattern_u_text = uregex_patternUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : UText*
  fun uregex_refresh_u_text = uregex_refreshUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, text : UText*, status : UErrorCode*)
  fun uregex_region_end64 = uregex_regionEnd64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int64T
  fun uregex_region_end = uregex_regionEnd{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int32T
  fun uregex_region_start64 = uregex_regionStart64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int64T
  fun uregex_region_start = uregex_regionStart{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : Int32T
  fun uregex_replace_all = uregex_replaceAll{{SYMS_SUFFIX.id}}(regexp : URegularExpression, replacement_text : UChar*, replacement_length : Int32T, dest_buf : UChar*, dest_capacity : Int32T, status : UErrorCode*) : Int32T
  fun uregex_replace_all_u_text = uregex_replaceAllUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, replacement : UText*, dest : UText*, status : UErrorCode*) : UText*
  fun uregex_replace_first = uregex_replaceFirst{{SYMS_SUFFIX.id}}(regexp : URegularExpression, replacement_text : UChar*, replacement_length : Int32T, dest_buf : UChar*, dest_capacity : Int32T, status : UErrorCode*) : Int32T
  fun uregex_replace_first_u_text = uregex_replaceFirstUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, replacement : UText*, dest : UText*, status : UErrorCode*) : UText*
  fun uregex_require_end = uregex_requireEnd{{SYMS_SUFFIX.id}}(regexp : URegularExpression, status : UErrorCode*) : UBool
  fun uregex_reset64 = uregex_reset64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, index : Int64T, status : UErrorCode*)
  fun uregex_reset = uregex_reset{{SYMS_SUFFIX.id}}(regexp : URegularExpression, index : Int32T, status : UErrorCode*)
  fun uregex_set_find_progress_callback = uregex_setFindProgressCallback{{SYMS_SUFFIX.id}}(regexp : URegularExpression, callback : (Void*, Int64T -> UBool), context : Void*, status : UErrorCode*)
  fun uregex_set_match_callback = uregex_setMatchCallback{{SYMS_SUFFIX.id}}(regexp : URegularExpression, callback : (Void*, Int32T -> UBool), context : Void*, status : UErrorCode*)
  fun uregex_set_region64 = uregex_setRegion64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, region_start : Int64T, region_limit : Int64T, status : UErrorCode*)
  fun uregex_set_region = uregex_setRegion{{SYMS_SUFFIX.id}}(regexp : URegularExpression, region_start : Int32T, region_limit : Int32T, status : UErrorCode*)
  fun uregex_set_region_and_start = uregex_setRegionAndStart{{SYMS_SUFFIX.id}}(regexp : URegularExpression, region_start : Int64T, region_limit : Int64T, start_index : Int64T, status : UErrorCode*)
  fun uregex_set_stack_limit = uregex_setStackLimit{{SYMS_SUFFIX.id}}(regexp : URegularExpression, limit : Int32T, status : UErrorCode*)
  fun uregex_set_text = uregex_setText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, text : UChar*, text_length : Int32T, status : UErrorCode*)
  fun uregex_set_time_limit = uregex_setTimeLimit{{SYMS_SUFFIX.id}}(regexp : URegularExpression, limit : Int32T, status : UErrorCode*)
  fun uregex_set_u_text = uregex_setUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, text : UText*, status : UErrorCode*)
  fun uregex_split = uregex_split{{SYMS_SUFFIX.id}}(regexp : URegularExpression, dest_buf : UChar*, dest_capacity : Int32T, required_capacity : Int32T*, dest_fields : UChar**, dest_fields_capacity : Int32T, status : UErrorCode*) : Int32T
  fun uregex_split_u_text = uregex_splitUText{{SYMS_SUFFIX.id}}(regexp : URegularExpression, dest_fields : UText**, dest_fields_capacity : Int32T, status : UErrorCode*) : Int32T
  fun uregex_start64 = uregex_start64{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_num : Int32T, status : UErrorCode*) : Int64T
  fun uregex_start = uregex_start{{SYMS_SUFFIX.id}}(regexp : URegularExpression, group_num : Int32T, status : UErrorCode*) : Int32T
  fun uregex_use_anchoring_bounds = uregex_useAnchoringBounds{{SYMS_SUFFIX.id}}(regexp : URegularExpression, b : UBool, status : UErrorCode*)
  fun uregex_use_transparent_bounds = uregex_useTransparentBounds{{SYMS_SUFFIX.id}}(regexp : URegularExpression, b : UBool, status : UErrorCode*)
  type URegularExpression = Void*
  {% end %}
end
