Win32 API 日本語リファレンス
ホームGlobalization › uregex_appendTailUText

uregex_appendTailUText

関数
最後の一致以降の残りテキストをUText出力に追記する。
DLLicuin.dll呼出規約cdecl

シグネチャ

// icuin.dll
#include <windows.h>

UText* uregex_appendTailUText(
    URegularExpression* regexp,
    UText* dest,
    UErrorCode* status
);

パラメーター

名前方向
regexpURegularExpression*inout
destUText*inout
statusUErrorCode*inout

戻り値の型: UText*

各言語での呼び出し定義

// icuin.dll
#include <windows.h>

UText* uregex_appendTailUText(
    URegularExpression* regexp,
    UText* dest,
    UErrorCode* status
);
[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr uregex_appendTailUText(
    ref IntPtr regexp,   // URegularExpression* in/out
    IntPtr dest,   // UText* in/out
    ref int status   // UErrorCode* in/out
);
<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uregex_appendTailUText(
    ByRef regexp As IntPtr,   ' URegularExpression* in/out
    dest As IntPtr,   ' UText* in/out
    ByRef status As Integer   ' UErrorCode* in/out
) As IntPtr
End Function
' regexp : URegularExpression* in/out
' dest : UText* in/out
' status : UErrorCode* in/out
Declare PtrSafe Function uregex_appendTailUText Lib "icuin" ( _
    ByRef regexp As LongPtr, _
    ByVal dest As LongPtr, _
    ByRef status As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

uregex_appendTailUText = ctypes.cdll.icuin.uregex_appendTailUText
uregex_appendTailUText.restype = ctypes.c_void_p
uregex_appendTailUText.argtypes = [
    ctypes.c_void_p,  # regexp : URegularExpression* in/out
    ctypes.c_void_p,  # dest : UText* in/out
    ctypes.c_void_p,  # status : UErrorCode* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('icuin.dll')
uregex_appendTailUText = Fiddle::Function.new(
  lib['uregex_appendTailUText'],
  [
    Fiddle::TYPE_VOIDP,  # regexp : URegularExpression* in/out
    Fiddle::TYPE_VOIDP,  # dest : UText* in/out
    Fiddle::TYPE_VOIDP,  # status : UErrorCode* in/out
  ],
  Fiddle::TYPE_VOIDP, Fiddle::Function::CDECL)
#[link(name = "icuin")]
extern "C" {
    fn uregex_appendTailUText(
        regexp: *mut isize,  // URegularExpression* in/out
        dest: *mut UText,  // UText* in/out
        status: *mut i32  // UErrorCode* in/out
    ) -> *mut UText;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uregex_appendTailUText(ref IntPtr regexp, IntPtr dest, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uregex_appendTailUText' -Namespace Win32 -PassThru
# $api::uregex_appendTailUText(regexp, dest, status)
#uselib "icuin.dll"
#func global uregex_appendTailUText "uregex_appendTailUText" sptr, sptr, sptr
; uregex_appendTailUText regexp, varptr(dest), status   ; 戻り値は stat
; regexp : URegularExpression* in/out -> "sptr"
; dest : UText* in/out -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "icuin.dll"
#cfunc global uregex_appendTailUText "uregex_appendTailUText" int, var, int
; res = uregex_appendTailUText(regexp, dest, status)
; regexp : URegularExpression* in/out -> "int"
; dest : UText* in/out -> "var"
; status : UErrorCode* in/out -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; UText* uregex_appendTailUText(URegularExpression* regexp, UText* dest, UErrorCode* status)
#uselib "icuin.dll"
#cfunc global uregex_appendTailUText "uregex_appendTailUText" int, var, int
; res = uregex_appendTailUText(regexp, dest, status)
; regexp : URegularExpression* in/out -> "int"
; dest : UText* in/out -> "var"
; status : UErrorCode* in/out -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuin = windows.NewLazySystemDLL("icuin.dll")
	procuregex_appendTailUText = icuin.NewProc("uregex_appendTailUText")
)

// regexp (URegularExpression* in/out), dest (UText* in/out), status (UErrorCode* in/out)
r1, _, err := procuregex_appendTailUText.Call(
	uintptr(regexp),
	uintptr(dest),
	uintptr(status),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // UText*
function uregex_appendTailUText(
  regexp: Pointer;   // URegularExpression* in/out
  dest: Pointer;   // UText* in/out
  status: Pointer   // UErrorCode* in/out
): Pointer; cdecl;
  external 'icuin.dll' name 'uregex_appendTailUText';
result := DllCall("icuin\uregex_appendTailUText"
    , "Ptr", regexp   ; URegularExpression* in/out
    , "Ptr", dest   ; UText* in/out
    , "Ptr", status   ; UErrorCode* in/out
    , "Cdecl Ptr")   ; return: UText*
●uregex_appendTailUText(regexp, dest, status) = DLL("icuin.dll", "void* uregex_appendTailUText(void*, void*, void*)")
# 呼び出し: uregex_appendTailUText(regexp, dest, status)
# regexp : URegularExpression* in/out -> "void*"
# dest : UText* in/out -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。