Skip to content

java.lang.String to int conversion #463

Closed Answered by vsquared
vsquared asked this question in Q&A
Discussion options

You must be logged in to vote

Never mind; I think I figured out how to do it. You have to convert java.lang.String to a python string using str(cmdStr), and then convert that to an int using int(pyStr).

# Converts java.lang.String to int
    pyStr = str(cmdStr)
    value = int(pyStr)
    print(type(value))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hx2A
Comment options

Answer selected by villares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants