Questions tagged [charsequence]

In Java (and related languages such as Scala), java.lang.CharSequence is an interface to sequences of character values.

For more information, see the Java 8 specification of CharSequence.

146 questions
0
votes
2 answers

Alternative to stream for converting Charsequence to String

I'm writing a mobile application in Android studio. I have an arrayList that i'm converting into a string to be evaluated in a script engine. I am currently using resultText = total.stream().collect(Collectors.joining("")); With total being …
0
votes
2 answers

How to assign null value to CharSequence in java?

In my app I was using EditText. I would like to assign numberOfYearsBirthday=0 when there is no text in the edittext. I have tried the following code and debugged. I have seen that even if my charSequence="" but it ignore the statement and move to…
abc
  • 275
  • 3
  • 11
0
votes
1 answer

Project works in Eclipse but when imported into IntelliJ IDEA I get the JasperException re: CharSequence

I have been handed an application which is almost 10 years old, for maintenance. A customer (internal) has a requirement change. The app was built and maintained in Eclipse to this point. I need to import it into IntelliJ (the current company…
CoMo G-Dawg
  • 401
  • 1
  • 3
  • 18
0
votes
1 answer

String converting issure

ive got a problem with string conversion. I am trying to implement a system where numbers (BigDecimal) are printed to the screen when they are updated. Therefore i created a subclass of BigDecimal (dpzahl) to detect the updated number and send a…
Piea
  • 3
  • 1
0
votes
1 answer

Clojure clojure.string/split hit java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.CharSequence

I tried to write a function to process a line of string by calling str\split, the function works fine if i call it directly in LEIN REPL window, but will hit the above call error while trying to run the program from LEIN RUN. Any suggestion? (let…
0
votes
2 answers

How to convert java CharSequence to c++ char* through JNI

I feel that this should have a simple answer as I can do it easily with a java String, but something is going wrong with the CharSequence. My java code initializes a cppGenerator, passes a functionBlock object to its generateImplementation method,…
Zannith
  • 429
  • 4
  • 21
0
votes
0 answers

Cyrillic characters are stored as "?" in exif

I create photo. I need to add a user comment in exif. I try next code @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { if (exifInterface != null){ try { …
user1854307
  • 580
  • 4
  • 8
  • 21
0
votes
1 answer

Scala Map of Strings not Compiling When CharSequence is expected

I'm trying to return a Map[CharSequence, CharSequence]. The point of the function is to check if another map has a certain key/value pair, and then return a particular CharSequence map. If I just return an empty map (or string map), this…
clo_jur
  • 1,359
  • 1
  • 11
  • 27
0
votes
1 answer

Set charsequence size after declaration

Ok, so I have something like: CharSequence[] lines; and then I want to set its size in an Android Dialog click, like: lines = new CharSequence[131]; but it will end up empty. I need to populate a dialog with its values, but if I would do something…
0
votes
1 answer

Having trouble with CharSequence

I just began studying how to code 2 weeks ago and I seem to be having trouble with the idea of using CharSequence. I am writing simple program, based on the tv show Game of Thrones, that lets me print out names, their allegiances and whether or not…
iVince905
  • 1
  • 1
  • 1
0
votes
3 answers

What is the fastest way to check amount of specific chars in a string in PHP?

So i need to check if amount of chars from specific set in a string is higher than some number, what a fastest way to do that? For example i have a long string "some text & some text & some text + a lot more + a lot more ... etc." and i need to…
Markus_13
  • 328
  • 2
  • 14
0
votes
2 answers

convert string value to charsequence and show it in notification in android

I want to show the result of this function in notification. public class TimerService extends Service { public String timeString; ... // service methodd public class CountingDownTimer extends CountDownTimer{ public…
Migitanar
  • 31
  • 8
0
votes
0 answers

Scrolling RecyclerView freezes on long TextViews

I am trying to implement a comment section-style layout using a RecyclerView. I have a list of CharSequence objects (each the result of Html.fromHtml(String, null, null)) which I use to populate this RecyclerView. Here is the RecyclerView…
Leo Aso
  • 11,898
  • 3
  • 25
  • 46
0
votes
0 answers

Position in string builder

I have a class CustomBuffer that implements Appendable, CharSequence and extends Buffer. It uses a charBuffer to access elements. Since it takes some time in computation I am planning to replace it with a StringBuilder. Unfortunately my current…
yellow
  • 425
  • 7
  • 20
0
votes
1 answer

Android: How to read a number as int from a String; basically to read Text of a ListViewItem?

This is my problem. I have a ListView, each row is a CheckedTextView. The list view items are "1", "2" and "3". When a ListItem is clicked, I want to read the number and assign it to an int variable. I did the following to read the Text of the…
kiki
  • 13,627
  • 17
  • 49
  • 62