|
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: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD 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.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids 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: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD 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 Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: 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. |
#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: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 02: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 |