ホーム › Globalization › uregex_matches64
uregex_matches64
関数対象が指定位置からパターン全体に一致するか64ビット位置で判定する。
シグネチャ
// icuin.dll
#include <windows.h>
CHAR uregex_matches64(
URegularExpression* regexp,
LONGLONG startIndex,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| regexp | URegularExpression* | inout |
| startIndex | LONGLONG | in |
| status | UErrorCode* | inout |
戻り値の型: CHAR
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
CHAR uregex_matches64(
URegularExpression* regexp,
LONGLONG startIndex,
UErrorCode* status
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte uregex_matches64(
ref IntPtr regexp, // URegularExpression* in/out
long startIndex, // LONGLONG
ref int status // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uregex_matches64(
ByRef regexp As IntPtr, ' URegularExpression* in/out
startIndex As Long, ' LONGLONG
ByRef status As Integer ' UErrorCode* in/out
) As SByte
End Function' regexp : URegularExpression* in/out
' startIndex : LONGLONG
' status : UErrorCode* in/out
Declare PtrSafe Function uregex_matches64 Lib "icuin" ( _
ByRef regexp As LongPtr, _
ByVal startIndex As LongLong, _
ByRef status As Long) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
uregex_matches64 = ctypes.cdll.icuin.uregex_matches64
uregex_matches64.restype = ctypes.c_byte
uregex_matches64.argtypes = [
ctypes.c_void_p, # regexp : URegularExpression* in/out
ctypes.c_longlong, # startIndex : LONGLONG
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
uregex_matches64 = Fiddle::Function.new(
lib['uregex_matches64'],
[
Fiddle::TYPE_VOIDP, # regexp : URegularExpression* in/out
Fiddle::TYPE_LONG_LONG, # startIndex : LONGLONG
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn uregex_matches64(
regexp: *mut isize, // URegularExpression* in/out
startIndex: i64, // LONGLONG
status: *mut i32 // UErrorCode* in/out
) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuin.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte uregex_matches64(ref IntPtr regexp, long startIndex, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uregex_matches64' -Namespace Win32 -PassThru
# $api::uregex_matches64(regexp, startIndex, status)#uselib "icuin.dll"
#func global uregex_matches64 "uregex_matches64" sptr, sptr, sptr
; uregex_matches64 regexp, startIndex, status ; 戻り値は stat
; regexp : URegularExpression* in/out -> "sptr"
; startIndex : LONGLONG -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は int64 引数(64bit値渡し)に非対応です。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuin.dll"
#cfunc global uregex_matches64 "uregex_matches64" int, int64, int
; res = uregex_matches64(regexp, startIndex, status)
; regexp : URegularExpression* in/out -> "int"
; startIndex : LONGLONG -> "int64"
; status : UErrorCode* in/out -> "int"
; ※int64 引数の DLL 値渡しは x64 ランタイム(hsp3_64)のみ対応(x86 は未対応)。; CHAR uregex_matches64(URegularExpression* regexp, LONGLONG startIndex, UErrorCode* status)
#uselib "icuin.dll"
#cfunc global uregex_matches64 "uregex_matches64" int, int64, int
; res = uregex_matches64(regexp, startIndex, status)
; regexp : URegularExpression* in/out -> "int"
; startIndex : LONGLONG -> "int64"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procuregex_matches64 = icuin.NewProc("uregex_matches64")
)
// regexp (URegularExpression* in/out), startIndex (LONGLONG), status (UErrorCode* in/out)
r1, _, err := procuregex_matches64.Call(
uintptr(regexp),
uintptr(startIndex),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // CHARfunction uregex_matches64(
regexp: Pointer; // URegularExpression* in/out
startIndex: Int64; // LONGLONG
status: Pointer // UErrorCode* in/out
): Shortint; cdecl;
external 'icuin.dll' name 'uregex_matches64';result := DllCall("icuin\uregex_matches64"
, "Ptr", regexp ; URegularExpression* in/out
, "Int64", startIndex ; LONGLONG
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Char") ; return: CHAR●uregex_matches64(regexp, startIndex, status) = DLL("icuin.dll", "char uregex_matches64(void*, int64, void*)")
# 呼び出し: uregex_matches64(regexp, startIndex, status)
# regexp : URegularExpression* in/out -> "void*"
# startIndex : LONGLONG -> "int64"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。