Task - String Programs - Trim a String #36
Replies: 36 comments
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
`package StringOperations; public class Trim { } |
Beta Was this translation helpful? Give feedback.
-
|
`import java.util.Scanner; public class StringTrim { |
Beta Was this translation helpful? Give feedback.
-
|
public class MyClass { } |
Beta Was this translation helpful? Give feedback.
-
|
`package all_strings; import java.util.*; public class TrimImplementation { }` |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
public class MyClass { |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
import java.util.*; |
Beta Was this translation helpful? Give feedback.
-
|
`public class TrailSpace { }` |
Beta Was this translation helpful? Give feedback.
-
|
import java.util.*; public class possstring { |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
` ` |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
import java.util.Scanner; } |
Beta Was this translation helpful? Give feedback.
-
|
class RemoveSpaces { |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
`import java.lang.*; public class Trim { ` |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
public class Trim { } |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Slim-Trim
WAP that accepts a String as input from the user and trims it. Write
myTrim(str)function which does the same.Trimming eliminates leading and trailing spaces.
Hint - The Unicode value of space character is '\u0020'
Beta Was this translation helpful? Give feedback.
All reactions