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