GameMaker (all)
Icon

Extended Functions

DukeSoft

You must be logged in to obtain assets

Description

NOTE: This marketplace version is no longer supported / updated. Use the Catalyst version for continued support: https://gamemakerhub.net/package/gamemakerhub/extended-functions

Extended functions for GM, such as;

  • string_explode
  • * Explode a string into an array ( "a;b;c" -> [a, b, c]
  • array_implode
  • * Paste together an array into a string ( [1, 2, 3] -> "1;2;3" )
  • string_reverse
  • * Reverse -> esreveR
  • string_mask
  • * Password -> ********
  • url_encode
  • * "test for # url?" -> "test%20for%20%23%20url%3F"
  • url_decode
  • * "test%20for%20%23%20url%3F" -> "test for # url?"
  • dectohex
  • * 123 -> "7B"
  • hextodec
  • * "7B" -> 123
  • string_ends_with
  • * string_ends_with("Testing", "ing") -> True
  • string_starts_with
  • * string_starts_with("##A Test", "#") -> True
  • string_prepend(string, prependchar, length) Prepend a string to a set length
  • * string_prepend('123', '0', 5) -> 00123
  • string_append(string, appendchar, length); Append a string to a set length
  • * string_append('123', 'ABC', 7) -> 123ABCA
  • round_whole(number, round); Round number on big numbers.
  • * round_whole(1234, 10) = 1230
  • netevent_to_string(event); Get a string representation of the network async events
  • * netevent_to_string(network_type_non_blocking_connect) = "non-blocking connect"
  • bit_from_byte(byte, bitnr); Get a bit at position from a number
  • * bit_from_byte(1, 0); = 1 // (first bit is 1, rest is 0)
  • string_trim(string); Trim the string of surrounding whitespaces
  • extract_header_from_string(string); Returns an array of headers (key=>value) from a HTTP formatted response (RFC 2616)
  • debug_log(string); Debug output with time and instance information

Also includes a small unit-testing setup, which it uses itself to test the string functions -> test_assert_same(provided, expected)

And they are all unit tested in this repo.

End User Licence Agreement (EULA).

Age Rating: 4+

Versions

GMS1 - Version 1.3.5. Published November 30, 2014

GMS2 - Version 1.4.1. Published November 1, 2018

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait