ホーム › Globalization › uregex_findNext
uregex_findNext
関数前回の一致に続く次の一致を検索する。
シグネチャ
// icuin.dll
#include <windows.h>
CHAR uregex_findNext(
URegularExpression* regexp,
UErrorCode* status
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| regexp | URegularExpression* | inout |
| status | UErrorCode* | inout |
戻り値の型: CHAR
各言語での呼び出し定義
// icuin.dll
#include <windows.h>
CHAR uregex_findNext(
URegularExpression* regexp,
UErrorCode* status
);[DllImport("icuin.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte uregex_findNext(
ref IntPtr regexp, // URegularExpression* in/out
ref int status // UErrorCode* in/out
);<DllImport("icuin.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uregex_findNext(
ByRef regexp As IntPtr, ' URegularExpression* in/out
ByRef status As Integer ' UErrorCode* in/out
) As SByte
End Function' regexp : URegularExpression* in/out
' status : UErrorCode* in/out
Declare PtrSafe Function uregex_findNext Lib "icuin" ( _
ByRef regexp As LongPtr, _
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_findNext = ctypes.cdll.icuin.uregex_findNext
uregex_findNext.restype = ctypes.c_byte
uregex_findNext.argtypes = [
ctypes.c_void_p, # regexp : URegularExpression* in/out
ctypes.c_void_p, # status : UErrorCode* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuin.dll')
uregex_findNext = Fiddle::Function.new(
lib['uregex_findNext'],
[
Fiddle::TYPE_VOIDP, # regexp : URegularExpression* in/out
Fiddle::TYPE_VOIDP, # status : UErrorCode* in/out
],
Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)#[link(name = "icuin")]
extern "C" {
fn uregex_findNext(
regexp: *mut isize, // URegularExpression* in/out
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_findNext(ref IntPtr regexp, ref int status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuin_uregex_findNext' -Namespace Win32 -PassThru
# $api::uregex_findNext(regexp, status)#uselib "icuin.dll"
#func global uregex_findNext "uregex_findNext" sptr, sptr
; uregex_findNext regexp, status ; 戻り値は stat
; regexp : URegularExpression* in/out -> "sptr"
; status : UErrorCode* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuin.dll"
#cfunc global uregex_findNext "uregex_findNext" int, int
; res = uregex_findNext(regexp, status)
; regexp : URegularExpression* in/out -> "int"
; status : UErrorCode* in/out -> "int"; CHAR uregex_findNext(URegularExpression* regexp, UErrorCode* status)
#uselib "icuin.dll"
#cfunc global uregex_findNext "uregex_findNext" int, int
; res = uregex_findNext(regexp, status)
; regexp : URegularExpression* in/out -> "int"
; status : UErrorCode* in/out -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuin = windows.NewLazySystemDLL("icuin.dll")
procuregex_findNext = icuin.NewProc("uregex_findNext")
)
// regexp (URegularExpression* in/out), status (UErrorCode* in/out)
r1, _, err := procuregex_findNext.Call(
uintptr(regexp),
uintptr(status),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // CHARfunction uregex_findNext(
regexp: Pointer; // URegularExpression* in/out
status: Pointer // UErrorCode* in/out
): Shortint; cdecl;
external 'icuin.dll' name 'uregex_findNext';result := DllCall("icuin\uregex_findNext"
, "Ptr", regexp ; URegularExpression* in/out
, "Ptr", status ; UErrorCode* in/out
, "Cdecl Char") ; return: CHAR●uregex_findNext(regexp, status) = DLL("icuin.dll", "char uregex_findNext(void*, void*)")
# 呼び出し: uregex_findNext(regexp, status)
# regexp : URegularExpression* in/out -> "void*"
# status : UErrorCode* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。