public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

How to prevent Cropped words when use .match & .join

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: How to prevent Cropped words when use .match & .join
  • Original author: Jonforum
  • Original date: December 11, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/how-to-prevent-cropped-words-when-use-match-join.72165/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript

Summary

Hi  I have a var with a huge string. Am try to make a max letter count for each line. Is work, but is cropped my word.

Archived First Post

Hi 


I have a var with a huge string.
Am try to make a max letter count for each line.
Is work, but is cropped my word.

How i can prevent Cropped words ?
Like the red Arrow show..


Here how ma var are setup


I use this myvar=myvar.match(/.{1,40}/g).join(' \n ');


// The text string example in a var
var TempDesscr = 'this is a test with text.match, but is cropping';

// Now replace the same var with the '\n'for break line eatch 40 letters
TempDesscr=TempDesscr.match(/.{1,40}/g).join(' \n ');



// and show function for the text description in picture bitmap
$gameScreen.setDTextPicture('\\OW[6] ' + TempDesscr +' ', 36);
$gameScreen.setFont('GameFont');
$gameScreen.showPicture(894, '', 0, 660, 485, 100, 100, 255, 0);


Protected download


Tanks a lot for helping guys

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

nocrooping.png
nocrooping.png
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rpg-maker-archive#js-learning

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar