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