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