public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

3 Followers

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

BMM_Archive · July 15, 2026

BMM_Archive
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);


nocrooping.png


Tanks a lot for helping guys

Downloads / Referenced Files

RPG Maker Web attachments are mirrored locally when available. Other external links remain hosted by their original creator or third-party service.

  • Local mirror: 33516-6f253f8818e1c072d8ad6758853aa8f2.png
    SHA-256: 04d36b5a47534729b54436e1896170f5a8dc7ad9e0eb2424ff8086eced30f584
    Original attachment URL: https://forums.rpgmakerweb.com/attachments/nocrooping-png.54075/

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.

Replies (0)

No replies yet.

0 replies 35 views

Log in to reply.