🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #104410

Re: Prosba o uproszczenie funkcji

#104410
From: InDesign Scripts
Date: Fri, 18 Dec 2009 09:55
23 lines
1735 bytes
> To jakby cos w ten desen:
> 
> Public Function fragment2(wartosc, separator, pozycja, ile_wyrazow)
> 
> Dim arrTablica As Variant
> Dim strTablica As String, i As Integer
> 
> arrTablica = Split(wartosc, separator)
> For i = pozycja - 1 To pozycja + ile_wyrazow - 2
>     strTablica = strTablica & arrTablica(i) & separator
> Next i
> 
> fragment2 = Left(strTablica, Len(strTablica) - 1)
> 
> End Function
> 
> Malo elegancko, pewnie tez trzeba dokladniej sie przyjrzec, ale tak na 
> szybko moze pomoze.

trzeba by dodać jeszcze sprawdzanie czy tablica nie jest mniejsza niz poczatkowa i koncowa kolumna do "wyciecia"
a separator może też być dłuższy niż jeden znak

robin
Technical Details
Message-ID: <hgfjhp$7um$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <hgdfq6$2ku$1@inews.gazeta.pl> <hgdjja$foq$1@inews.gazeta.pl> <hgdoe6$3ia$1@inews.gazeta.pl> <hgeh3l$3nt$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: InDesign Scripts <indesignscripts@gazeta.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: Prosba o uproszczenie funkcji
Date: Fri, 18 Dec 2009 09:55:02 +0000
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 23
Message-ID: <hgfjhp$7um$1@inews.gazeta.pl>
References: <hgdfq6$2ku$1@inews.gazeta.pl> <hgdjja$foq$1@inews.gazeta.pl> <hgdoe6$3ia$1@inews.gazeta.pl> <hgeh3l$3nt$1@inews.gazeta.pl>
NNTP-Posting-Host: host81-158-97-19.range81-158.btcentralplus.com
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1261130105 8150 81.158.97.19 (18 Dec 2009 09:55:05 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 18 Dec 2009 09:55:05 +0000 (UTC)
X-User: indesignscripts
X-Antivirus: avast! (VPS 091217-1, 2009-12-17), Outbound message
In-Reply-To: <hgeh3l$3nt$1@inews.gazeta.pl>
X-Antivirus-Status: Clean
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit