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

ubrk_isBoundary

関数
指定位置がテキスト境界かどうかを判定する。
DLLicuuc.dll呼出規約cdecl

シグネチャ

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

CHAR ubrk_isBoundary(
    UBreakIterator* bi,
    INT offset
);

パラメーター

名前方向説明
biUBreakIterator*inout判定対象の区切り反復子を指す。
offsetINTin境界であるか判定する対象のテキストオフセット。

戻り値の型: CHAR

各言語での呼び出し定義

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

CHAR ubrk_isBoundary(
    UBreakIterator* bi,
    INT offset
);
[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte ubrk_isBoundary(
    ref IntPtr bi,   // UBreakIterator* in/out
    int offset   // INT
);
<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ubrk_isBoundary(
    ByRef bi As IntPtr,   ' UBreakIterator* in/out
    offset As Integer   ' INT
) As SByte
End Function
' bi : UBreakIterator* in/out
' offset : INT
Declare PtrSafe Function ubrk_isBoundary Lib "icuuc" ( _
    ByRef bi As LongPtr, _
    ByVal offset As Long) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ubrk_isBoundary = ctypes.cdll.icuuc.ubrk_isBoundary
ubrk_isBoundary.restype = ctypes.c_byte
ubrk_isBoundary.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_isBoundary = Fiddle::Function.new(
  lib['ubrk_isBoundary'],
  [
    Fiddle::TYPE_VOIDP,  # bi : UBreakIterator* in/out
    Fiddle::TYPE_INT,  # offset : INT
  ],
  Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)
#[link(name = "icuuc")]
extern "C" {
    fn ubrk_isBoundary(
        bi: *mut isize,  // UBreakIterator* in/out
        offset: i32  // INT
    ) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte ubrk_isBoundary(ref IntPtr bi, int offset);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_ubrk_isBoundary' -Namespace Win32 -PassThru
# $api::ubrk_isBoundary(bi, offset)
#uselib "icuuc.dll"
#func global ubrk_isBoundary "ubrk_isBoundary" sptr, sptr
; ubrk_isBoundary bi, offset   ; 戻り値は stat
; bi : UBreakIterator* in/out -> "sptr"
; offset : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "icuuc.dll"
#cfunc global ubrk_isBoundary "ubrk_isBoundary" int, int
; res = ubrk_isBoundary(bi, offset)
; bi : UBreakIterator* in/out -> "int"
; offset : INT -> "int"
; CHAR ubrk_isBoundary(UBreakIterator* bi, INT offset)
#uselib "icuuc.dll"
#cfunc global ubrk_isBoundary "ubrk_isBoundary" int, int
; res = ubrk_isBoundary(bi, offset)
; bi : UBreakIterator* in/out -> "int"
; offset : INT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	icuuc = windows.NewLazySystemDLL("icuuc.dll")
	procubrk_isBoundary = icuuc.NewProc("ubrk_isBoundary")
)

// bi (UBreakIterator* in/out), offset (INT)
r1, _, err := procubrk_isBoundary.Call(
	uintptr(bi),
	uintptr(offset),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // CHAR
function ubrk_isBoundary(
  bi: Pointer;   // UBreakIterator* in/out
  offset: Integer   // INT
): Shortint; cdecl;
  external 'icuuc.dll' name 'ubrk_isBoundary';
result := DllCall("icuuc\ubrk_isBoundary"
    , "Ptr", bi   ; UBreakIterator* in/out
    , "Int", offset   ; INT
    , "Cdecl Char")   ; return: CHAR
●ubrk_isBoundary(bi, offset) = DLL("icuuc.dll", "char ubrk_isBoundary(void*, int)")
# 呼び出し: ubrk_isBoundary(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`,…) を使用。