ホーム › Globalization › uset_removeAllCodePoints
uset_removeAllCodePoints
関数文字列中の全コードポイントをUSetから削除する。
シグネチャ
// icu.dll
#include <windows.h>
void uset_removeAllCodePoints(
USet* set,
const WORD* str,
INT length
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| set | USet* | inout |
| str | WORD* | in |
| length | INT | in |
戻り値の型: void
各言語での呼び出し定義
// icu.dll
#include <windows.h>
void uset_removeAllCodePoints(
USet* set,
const WORD* str,
INT length
);[DllImport("icu.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern void uset_removeAllCodePoints(
ref IntPtr set, // USet* in/out
ref ushort str, // WORD*
int length // INT
);<DllImport("icu.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Sub uset_removeAllCodePoints(
ByRef [set] As IntPtr, ' USet* in/out
ByRef str As UShort, ' WORD*
length As Integer ' INT
)
End Sub' set : USet* in/out
' str : WORD*
' length : INT
Declare PtrSafe Sub uset_removeAllCodePoints Lib "icu" ( _
ByRef set As LongPtr, _
ByRef str As Integer, _
ByVal length As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
uset_removeAllCodePoints = ctypes.cdll.icu.uset_removeAllCodePoints
uset_removeAllCodePoints.restype = None
uset_removeAllCodePoints.argtypes = [
ctypes.c_void_p, # set : USet* in/out
ctypes.POINTER(ctypes.c_ushort), # str : WORD*
ctypes.c_int, # length : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icu.dll')
uset_removeAllCodePoints = Fiddle::Function.new(
lib['uset_removeAllCodePoints'],
[
Fiddle::TYPE_VOIDP, # set : USet* in/out
Fiddle::TYPE_VOIDP, # str : WORD*
Fiddle::TYPE_INT, # length : INT
],
Fiddle::TYPE_VOID, Fiddle::Function::CDECL)#[link(name = "icu")]
extern "C" {
fn uset_removeAllCodePoints(
set: *mut isize, // USet* in/out
str: *const u16, // WORD*
length: i32 // INT
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icu.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void uset_removeAllCodePoints(ref IntPtr set, ref ushort str, int length);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icu_uset_removeAllCodePoints' -Namespace Win32 -PassThru
# $api::uset_removeAllCodePoints(set, str, length)#uselib "icu.dll"
#func global uset_removeAllCodePoints "uset_removeAllCodePoints" sptr, sptr, sptr
; uset_removeAllCodePoints set, varptr(str), length
; set : USet* in/out -> "sptr"
; str : WORD* -> "sptr"
; length : INT -> "sptr"出力引数:
#uselib "icu.dll" #func global uset_removeAllCodePoints "uset_removeAllCodePoints" int, var, int ; uset_removeAllCodePoints set, str, length ; set : USet* in/out -> "int" ; str : WORD* -> "var" ; length : INT -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "icu.dll" #func global uset_removeAllCodePoints "uset_removeAllCodePoints" int, sptr, int ; uset_removeAllCodePoints set, varptr(str), length ; set : USet* in/out -> "int" ; str : WORD* -> "sptr" ; length : INT -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void uset_removeAllCodePoints(USet* set, WORD* str, INT length) #uselib "icu.dll" #func global uset_removeAllCodePoints "uset_removeAllCodePoints" int, var, int ; uset_removeAllCodePoints set, str, length ; set : USet* in/out -> "int" ; str : WORD* -> "var" ; length : INT -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void uset_removeAllCodePoints(USet* set, WORD* str, INT length) #uselib "icu.dll" #func global uset_removeAllCodePoints "uset_removeAllCodePoints" int, intptr, int ; uset_removeAllCodePoints set, varptr(str), length ; set : USet* in/out -> "int" ; str : WORD* -> "intptr" ; length : INT -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icu = windows.NewLazySystemDLL("icu.dll")
procuset_removeAllCodePoints = icu.NewProc("uset_removeAllCodePoints")
)
// set (USet* in/out), str (WORD*), length (INT)
r1, _, err := procuset_removeAllCodePoints.Call(
uintptr(set),
uintptr(str),
uintptr(length),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure uset_removeAllCodePoints(
set: Pointer; // USet* in/out
str: Pointer; // WORD*
length: Integer // INT
); cdecl;
external 'icu.dll' name 'uset_removeAllCodePoints';result := DllCall("icu\uset_removeAllCodePoints"
, "Ptr", set ; USet* in/out
, "Ptr", str ; WORD*
, "Int", length ; INT
, "Cdecl Int") ; return: void●uset_removeAllCodePoints(set, str, length) = DLL("icu.dll", "int uset_removeAllCodePoints(void*, void*, int)")
# 呼び出し: uset_removeAllCodePoints(set, str, length)
# set : USet* in/out -> "void*"
# str : WORD* -> "void*"
# length : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。