Built-in class Extension's v1.9.5
Author Sarlecc
Introduction
This script adds four new methods to the String class and three to the Array class more may be added in the future as I think of them.
Updates:
- v1.5 added three methods to the Array class and changed the name to Built-in class Extension's. (as it now handles more than just Strings)
- v1.6 added mix_up method to String class.
- v1.8 added search method to array class, added prime? method to Math module. Also due to the length of the script putting it up on mediafire.
- v1.9 added two new methods to the Array class. Also was having problems updating the script so the download link changed...
-v1.9.5 added new prime number checking algorithm. now check if a prime number is prime much faster (slower though on composite numbers)
Features
SpoilerSpoiler
- Can remove every other character
- Can add characters every other character
- Can convert a string to random characters.
- Can mix the characters in a string.
- Can find the mean.
- Can find the median.
- Can find the range.
- Can search for certain numbers in an array
- Can determine if a number is a prime number
- Can find the id in an array with the lowest value
- Can find the id in an array with the highest value
Screenshots
None needed
How to Use
Place script below materials and above main
Code:
Demo
Yea none needed.
Script
Script
GitHub
FAQ
None yet.
Credit
- Sarlecc
Terms
Author's Notes:
The difference between rand_chars and mix_up is mix_up only returns a string containing characters in that string. The rand_chars method returns random characters that do not necessarily show up in the string. I'm guessing that mix_up might be good for anagrams/scrabble style games?
本贴来自国际rpgmaker官方论坛作者:Sarlecc处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/built-in-class-extensions-v1-9-5-updated.42319/