3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

enable binary string access to unsigned numerals over API #4568

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-07-07 18:58:42 -07:00
parent 4a8533e41f
commit 4b346ef693
3 changed files with 23 additions and 2 deletions

View file

@ -100,13 +100,21 @@ namespace Microsoft.Z3
#endif
/// <summary>
/// Returns a string representation of the numeral.
/// Returns a decimal string representation of the numeral.
/// </summary>
public override string ToString()
{
return Native.Z3_get_numeral_string(Context.nCtx, NativeObject);
}
/// <summary>
/// Returns a binary string representation of the numeral.
/// </summary>
public string ToBinaryString()
{
return Native.Z3_get_numeral_binary_string(Context.nCtx, NativeObject);
}
#region Internal
internal BitVecNum(Context ctx, IntPtr obj) : base(ctx, obj) { Debug.Assert(ctx != null); }
#endregion