Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions public/usage-examples/utilities/bin_to_hex-1-example-oop.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using SplashKitSDK;

public
class Program
{
public
static void Main()
{
string binaryValue = "111110011010";
string hexValue = SplashKit.BinToHex(binaryValue); // SplashKit function

SplashKit.WriteLine("Binary: " + binaryValue);
SplashKit.WriteLine("Hex: " + hexValue);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using SplashKitSDK;

string binaryValue = "111110011010";
string hexValue = SplashKit.BinToHex(binaryValue); // SplashKit function

SplashKit.WriteLine("Binary: " + binaryValue);
SplashKit.WriteLine("Hex: " + hexValue);
12 changes: 12 additions & 0 deletions public/usage-examples/utilities/bin_to_hex-1-example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "splashkit.h"

int main()
{
string binary_value = "111110011010";
string hex_value = bin_to_hex(binary_value); // SplashKit function

write_line("Binary: " + binary_value);
write_line("Hex: " + hex_value);

return 0;
}
7 changes: 7 additions & 0 deletions public/usage-examples/utilities/bin_to_hex-1-example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from splashkit import write_line, bin_to_hex

binary_value = "111110011010"
hex_value = bin_to_hex(binary_value) # SplashKit function

write_line("Binary: " + binary_value)
write_line("Hex: " + hex_value)
2 changes: 2 additions & 0 deletions public/usage-examples/utilities/bin_to_hex-1-example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This example demonstrates how to convert a binary string into a hexadecimal string
using SplashKit's built-in bin_to_hex / BinToHex function in Python, C++, and C#.