ホーム › Globalization › uloc_isRightToLeft
uloc_isRightToLeft
関数指定ロケールが右から左へ書く言語かどうかを判定する。
シグネチャ
// icuuc.dll
#include <windows.h>
CHAR uloc_isRightToLeft(
LPCSTR locale
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| locale | LPCSTR | in |
戻り値の型: CHAR
各言語での呼び出し定義
// icuuc.dll
#include <windows.h>
CHAR uloc_isRightToLeft(
LPCSTR locale
);[DllImport("icuuc.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte uloc_isRightToLeft(
[MarshalAs(UnmanagedType.LPStr)] string locale // LPCSTR
);<DllImport("icuuc.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function uloc_isRightToLeft(
<MarshalAs(UnmanagedType.LPStr)> locale As String ' LPCSTR
) As SByte
End Function' locale : LPCSTR
Declare PtrSafe Function uloc_isRightToLeft Lib "icuuc" ( _
ByVal locale As String) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
uloc_isRightToLeft = ctypes.cdll.icuuc.uloc_isRightToLeft
uloc_isRightToLeft.restype = ctypes.c_byte
uloc_isRightToLeft.argtypes = [
wintypes.LPCSTR, # locale : LPCSTR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('icuuc.dll')
uloc_isRightToLeft = Fiddle::Function.new(
lib['uloc_isRightToLeft'],
[
Fiddle::TYPE_VOIDP, # locale : LPCSTR
],
Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)#[link(name = "icuuc")]
extern "C" {
fn uloc_isRightToLeft(
locale: *const u8 // LPCSTR
) -> i8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("icuuc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte uloc_isRightToLeft([MarshalAs(UnmanagedType.LPStr)] string locale);
"@
$api = Add-Type -MemberDefinition $sig -Name 'icuuc_uloc_isRightToLeft' -Namespace Win32 -PassThru
# $api::uloc_isRightToLeft(locale)#uselib "icuuc.dll"
#func global uloc_isRightToLeft "uloc_isRightToLeft" sptr
; uloc_isRightToLeft locale ; 戻り値は stat
; locale : LPCSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "icuuc.dll"
#cfunc global uloc_isRightToLeft "uloc_isRightToLeft" str
; res = uloc_isRightToLeft(locale)
; locale : LPCSTR -> "str"; CHAR uloc_isRightToLeft(LPCSTR locale)
#uselib "icuuc.dll"
#cfunc global uloc_isRightToLeft "uloc_isRightToLeft" str
; res = uloc_isRightToLeft(locale)
; locale : LPCSTR -> "str"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
icuuc = windows.NewLazySystemDLL("icuuc.dll")
proculoc_isRightToLeft = icuuc.NewProc("uloc_isRightToLeft")
)
// locale (LPCSTR)
r1, _, err := proculoc_isRightToLeft.Call(
uintptr(unsafe.Pointer(windows.BytePtrFromString(locale))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // CHARfunction uloc_isRightToLeft(
locale: PAnsiChar // LPCSTR
): Shortint; cdecl;
external 'icuuc.dll' name 'uloc_isRightToLeft';result := DllCall("icuuc\uloc_isRightToLeft"
, "AStr", locale ; LPCSTR
, "Cdecl Char") ; return: CHAR●uloc_isRightToLeft(locale) = DLL("icuuc.dll", "char uloc_isRightToLeft(char*)")
# 呼び出し: uloc_isRightToLeft(locale)
# locale : LPCSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。