Prolog - List of CharCodes to a String or Characters

后端 未结 3 957
难免孤独
难免孤独 2021-01-18 03:22

I have a list of Character Codes in prolog.

I would like to change them into characters.

For instance,

L = \"abc\" returns L = [9

3条回答
  •  忘掉有多难
    2021-01-18 04:15

    Use char_code(?Atom, ?ASCII) in a map list.

    char_code(?Atom, ?ASCII) Convert between character and ASCII value for a single character. (16)

    Source

提交回复
热议问题