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
17 changes: 17 additions & 0 deletions public/usage-examples/utilities/base64_encode-1-example-oop.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using SplashKitSDK;

public class BaseEncode
{
public static void Main()
{
string text = "Hello SplashKit";

// Encode a plain string into Base64
string encoded = SplashKit.Base64Encode(text);

// Display the original and encoded values
SplashKit.WriteLine("Original: " + text);
SplashKit.WriteLine("Base64: " + encoded);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using SplashKitSDK;

string text = "Hello SplashKit";

// Encode a plain string into Base64
string encoded = SplashKit.Base64Encode(text);

// Display the original and encoded values
SplashKit.WriteLine("Original: " + text);
SplashKit.WriteLine("Base64: " + encoded);
15 changes: 15 additions & 0 deletions public/usage-examples/utilities/base64_encode-1-example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "splashkit.h"

int main()
{
string text = "Hello SplashKit";

// Encode a plain string into Base64
string encoded = base64_encode(text);

// Display the original and encoded values
write_line("Original: " + text);
write_line("Base64: " + encoded);

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

text = "Hello SplashKit"

# Encode a plain string into Base64
encoded = base64_encode(text)

# Print the original and encoded values
write_line("Original: " + text)
write_line("Base64: " + encoded)
8 changes: 8 additions & 0 deletions public/usage-examples/utilities/base64_encode-1-example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Function: base64_encode
Category: Utilities
Purpose: Demonstrates how to encode a plain string ("Hello SplashKit") into Base64 using SplashKit.
Languages: C++, Python, C# (OOP), C# (Top-level)

Expected Output:
Original: Hello SplashKit
Base64: SGVsbG8gU3BsYXNoS2l0