Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Function to get string containing the same letter added multiple times?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Extended and XML Frames o...
by
matthius
[
Today
at 01:01:09 am]
var vs out (including "co...
by
440bx
[
Today
at 12:56:32 am]
Which Linux version
by
cdbc
[August 12, 2026, 11:22:16 pm]
Strangely - Not a questio...
by
Bart
[August 12, 2026, 10:26:58 pm]
Selected Text get number ...
by
Martin_fr
[August 12, 2026, 09:47:56 pm]
To DebugLn or not to Debu...
by
Martin_fr
[August 12, 2026, 09:01:02 pm]
Unleashed Pascal (async/a...
by
Martin_fr
[August 12, 2026, 08:54:07 pm]
New Big Integer library i...
by
ad1mt
[August 12, 2026, 07:16:56 pm]
The best name for procedu...
by
LemonParty
[August 12, 2026, 07:02:53 pm]
Why does Free Pascal use ...
by
440bx
[August 12, 2026, 07:02:28 pm]
[RE-SOLVED] Splitting an ...
by
madref
[August 12, 2026, 04:58:26 pm]
'ReadStr' ?
by
J-G
[August 12, 2026, 03:37:39 pm]
Fpcupdeluxe
by
DonAlfredo
[August 12, 2026, 02:20:26 pm]
Trayslate 1.5.0 - Free tr...
by
AlexanderT
[August 12, 2026, 02:18:28 pm]
TlsLib4Pascal
by
Xor-el
[August 12, 2026, 02:16:41 pm]
enable easy marker moveme...
by
Paolo
[August 12, 2026, 01:30:39 pm]
Error installing EyeCandy...
by
JuhaManninen
[August 12, 2026, 08:46:00 am]
Lazarus undead repository...
by
CM630
[August 11, 2026, 11:40:09 pm]
LRS Explorer
by
CM630
[August 11, 2026, 11:33:24 pm]
Identify network devices
by
Warfley
[August 11, 2026, 10:55:13 pm]
Lazarus Bugfix Release 4....
by
geraldholdsworth
[August 11, 2026, 04:55:42 pm]
[Solved[ How to define th...
by
Mike.Cornflake
[August 11, 2026, 03:42:11 pm]
Dataset EnableControls/Di...
by
Mike.Cornflake
[August 11, 2026, 03:37:42 pm]
Debugging in a real termi...
by
Martin_fr
[August 11, 2026, 02:59:09 pm]
how to bring in view the ...
by
Aruna
[August 11, 2026, 02:33:55 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Function to get string containing the same letter added multiple times? (Read 5426 times)
krexon
Jr. Member
Posts: 80
Function to get string containing the same letter added multiple times?
«
on:
May 06, 2011, 04:06:02 pm »
I forgot the name of function to build string with the letter added "n" times..
Instead of loop: for i:=0 to n do s:=s+'a' I want use: function('a', n), where n means how many times to add letter.
Logged
Blaazen
Hero Member
Posts: 3241
POKE 54296,15
Re: Function to get string containing the same letter added multiple times?
«
Reply #1 on:
May 06, 2011, 04:27:07 pm »
Do you mean this:
http://www.freepascal.org/docs-html/rtl/strutils/addcharr.html
Logged
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21
Try Eye-Candy Controls:
https://sourceforge.net/projects/eccontrols/files/
Marc
Administrator
Hero Member
Posts: 2706
Re: Function to get string containing the same letter added multiple times?
«
Reply #2 on:
May 06, 2011, 05:09:24 pm »
Or System
StringOfChar()
Logged
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the
bug tracker
krexon
Jr. Member
Posts: 80
Re: Function to get string containing the same letter added multiple times?
«
Reply #3 on:
May 11, 2011, 09:01:10 am »
Thx Marc. I forgot the name of that function
Logged
henrichg
Newbie
Posts: 1
Re: Function to get string containing the same letter added multiple times?
«
Reply #4 on:
May 11, 2011, 11:52:54 am »
FillChar:
http://www.freepascal.org/docs-html/rtl/system/fillchar.html
Logged
Marc
Administrator
Hero Member
Posts: 2706
Re: Function to get string containing the same letter added multiple times?
«
Reply #5 on:
May 12, 2011, 11:20:39 am »
FillChar is not exactly the same. StringOfChar() allocates the sting and fills it, while FillChar() only fills a buffer (which you have to allocate first)
Logged
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the
bug tracker
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Function to get string containing the same letter added multiple times?
TinyPortal
© 2005-2018