Skip to main content

StringFromJString

Type​

handler

Summary​

Convert a java string into a String

Syntax​

StringFromJString(<pObj>)

Description​

Use StringFromJString to convert an instance of the class java.lang.String to a variable of type String.

Parameters​

NameTypeDescription

pObj

The JString to convert

Examples​

foreign handler JavaGetDefaultLocale() returns JObject binds to "java:java.util.Locale>getDefault()Ljava/util/Locale;!static"
foreign handler JavaLocaleDisplayName(in pLocale as JObject) returns JObject binds to "java:java.util.Locale>getDisplayName()Ljava/lang/String;"

public handler GetDefaultLocaleDisplayName() returns String
unsafe
variable tLocale as JObject
put JavaGetDefaultLocale() into tLocale

variable tDisplay as JString
put JavaLocaleDisplayName(tLocale) into tDisplay

return StringFromJString(tDisplay)
end unsafe
end handler
Thank you for your feedback!

Was this page helpful?