![]() |
|
|||||||
| SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
How to shorten a string?
Is there a java string method available that shortens a string to some maximum specified length?
Also, where can I find a list of java methods available so I do not have to ask these silly questions? Thanks, Tom
__________________
Sage Server: ASUS/Intel C2D based system w/4GB RAM. WinXP Home, Hauppauge PVR 150, Hauppauge HVR-2250 and an HDHR. Runs headless. Accessed via VNC when necessary. Four HD-300 Extenders. |
|
#2
|
||||
|
||||
|
you can use string.substring(0,n) to return the first n characters from the string. I've actually found this a very handy page for processing strings in ANY language.
__________________
Sage Server: Phenom II X4, 16GB RAM, Win7HP, 1x1TB (system/misc-imports), 2x750GB+3x2TB(recordings/media) Sources: Two R-5000HD equipped ViP-211's for Dish Network, HDHR3 Dual for OTA Primary Client: i3-530, 2GB RAM, Win7HPx86, miniITX H55 MB, 160GB laptop drive, Samsung HLT-6189S Other Clients: Phenom II X2 545 w/8GB and HD6670 in Master Bedroom, MVP in kids play room |
|
#3
|
|||
|
|||
|
Quote:
Google and yahoo search help me allot I have searched them many time for java code examples Also sun has great resources I will shoot you a email with other links I use that could be helpful to you |
|
#4
|
||||
|
||||
|
Quote:
__________________
-- Greg |
|
#5
|
||||
|
||||
|
OK, thanks. Now I have lots of new toys to play with
![]() What syntax do I use to use these APIs in Studio? Looking at the substring() method it uses examples like: "hamburger".substring(0,n). I'm assuming in Studio I need java_lang_String_substring() but substring only accepts 2 parameters (start,end). Where do I specify the string? Thanks, Tom
__________________
Sage Server: ASUS/Intel C2D based system w/4GB RAM. WinXP Home, Hauppauge PVR 150, Hauppauge HVR-2250 and an HDHR. Runs headless. Accessed via VNC when necessary. Four HD-300 Extenders. |
|
#6
|
||||
|
||||
|
Quote:
I would usually say the default STV has java examples, but in this case, you might as well use the SageTV API call: Substring(). You can also use Size() to get the length of the string. - Andy
__________________
SageTV v7.1.9 is available here. - Read the SageTV FAQ and PDF User's Guides for SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. Before you ask: no, I can't say "when".
|
|
#7
|
||||
|
||||
|
DOH! I didn't even notice there was s Sage API for it. It just shows you that what my wife says about me is true
__________________
Sage Server: ASUS/Intel C2D based system w/4GB RAM. WinXP Home, Hauppauge PVR 150, Hauppauge HVR-2250 and an HDHR. Runs headless. Accessed via VNC when necessary. Four HD-300 Extenders. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the best way to get the width in pixels of a string? | BobPhoenix | SageTV Studio | 4 | 12-16-2007 01:56 AM |
| Stripping out illegal chars from string | evilpenguin | SageTV Studio | 3 | 10-16-2007 12:10 AM |
| Studio String help | evilpenguin | SageTV Studio | 1 | 06-10-2006 08:55 PM |
| String manipulation in Studio | Alfiegerner | SageTV Studio | 3 | 05-16-2006 05:24 PM |
| OK to string tv splitters/boosters together? | jimbobuk | General Discussion | 5 | 05-16-2003 10:01 AM |