Adobe Community
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
ShowÂ
 onlyÂ
|
Search instead forÂ
Did you mean:Â
Global community
Language:
Deutsch
English
Español
Français
Português
日本語コミュニティ
Dedicated community for Japanese speakers
í•œêµ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Sign In
Exit
Home
ColdFusion
Discussions
padding with spaces
Home
ColdFusion
Discussions
padding with spaces
0
Upvote
padding with spaces
fusiongirl
New Here
,
/t5/coldfusion-discussions/padding-with-spaces/td-p/726750
Dec 19, 2006
Dec 19, 2006
Copy link to clipboard
Copied
I need to write data to a fixed length file. So if I have a field that is 10 characters long but the file has room for 15 spaces I want to pad it with spaces. Can someone tell me the best way to accomplish this?
TOPICS
Advanced techniques
Views
415
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
4 Replies
4
Jump to latest reply
Guest
/t5/coldfusion-discussions/padding-with-spaces/m-p/726751#M67859
Dec 19, 2006
Dec 19, 2006
Copy link to clipboard
Copied
myString & repeatString(" ", 15-len(myString))
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
MikerRoo
Advisor
,
/t5/coldfusion-discussions/padding-with-spaces/m-p/726753#M67861
Dec 19, 2006
Dec 19, 2006
Copy link to clipboard
Copied
In Response To Deleted User
Actually that's not a good solution.
The best way to do this is to pad the values, in the source query, using DB functions.
The next best way is to use the LJustify() or RJustify() Coldfusion functions.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
fusiongirl
AUTHOR
New Here
,
/t5/coldfusion-discussions/padding-with-spaces/m-p/726752#M67860
Dec 19, 2006
Dec 19, 2006
Copy link to clipboard
Copied
Thank you.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guest
/t5/coldfusion-discussions/padding-with-spaces/m-p/726754#M67862
Dec 19, 2006
Dec 19, 2006
Copy link to clipboard
Copied
LATEST
interesting. i wasn't familiar with the LJustify() or RJustify() functions. nice
🙂
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Â
Resources
Documentation
ColdFusion User Guide