aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/util.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-09-10 19:11:41 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2019-09-10 19:36:11 +0200
commitbd7fde99af3df59c5ec96184b2649b4308250b24 (patch)
tree49f67c73f6ecc69bb949ea81b49814c90a13f0bd /xmpp-vala/src/util.vala
parentd5d305193ce527f1cc3022c406de35d9a85d4ccb (diff)
downloaddino-bd7fde99af3df59c5ec96184b2649b4308250b24.tar.gz
dino-bd7fde99af3df59c5ec96184b2649b4308250b24.zip
fixup Fix some warnings
Diffstat (limited to 'xmpp-vala/src/util.vala')
-rw-r--r--xmpp-vala/src/util.vala34
1 files changed, 12 insertions, 22 deletions
diff --git a/xmpp-vala/src/util.vala b/xmpp-vala/src/util.vala
index 34a05b7a..6c0d0c9b 100644
--- a/xmpp-vala/src/util.vala
+++ b/xmpp-vala/src/util.vala
@@ -1,27 +1,17 @@
namespace Xmpp.Util {
-// Parse a number from a hexadecimal representation.
-//
-// Skips any whitespace at the start of the string, parses as many valid
-// characters as hexadecimal digits as possible (possibly zero) and returns
-// them as an integer value.
-//
-// ```
-// // 0x0
-// print("0x%lx\n", from_hex(""));
-//
-// // 0x123abc
-// print("0x%lx\n", from_hex("123abc"));
-//
-// // 0x0
-// print("0x%lx\n", from_hex("0x123abc"));
-//
-// // 0xa
-// print("0x%lx\n", from_hex("A quick brown fox jumps over the lazy dog."));
-//
-// // 0xfeed
-// print("0x%lx\n", from_hex(" FEED ME "));
-// ```
+ /**
+ * Parse a number from a hexadecimal representation.
+ *
+ * Skips any whitespace at the start of the string, parses as many valid
+ * characters as hexadecimal digits as possible (possibly zero) and returns
+ * them as an integer value.
+ *
+ * ```
+ * // 0xa
+ * print("0x%lx\n", from_hex("A quick brown fox jumps over the lazy dog."));
+ * ```
+ */
public long from_hex(string numeral) {
long result = 0;