Skip to content

Tinyu01/java-string-manipulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java String Manipulation

This repository provides a comprehensive guide and practical examples for string manipulation in Java. It covers essential string operations that are commonly used in software development.

Table of Contents

Introduction

String manipulation is a fundamental skill for any software developer. In Java, the String class provides numerous methods to handle and process text effectively. This repository serves as a learning resource for understanding and applying these string manipulation techniques.

Key Concepts

  1. String Indexing: Understanding how characters in strings are indexed (0-based)
  2. String Comparison: Methods to compare strings with/without case sensitivity
  3. Substring Operations: Finding, extracting, and validating substrings
  4. String Transformation: Converting strings to different cases, trimming spaces, etc.

Code Examples

The src directory contains practical examples organized by functionality:

  • basics: Fundamental string operations
  • search: Methods for finding substrings and checking prefixes/suffixes
  • comparison: Ways to compare strings
  • practical: Real-world applications of string manipulation

Exercises

The exercises directory contains practice problems to test your understanding:

  • Exercise 1: Check if a string contains "good" and display appropriate message
  • Exercise 2: Compare different names while ignoring case

Documentation

The docs directory contains detailed explanations of:

  • String indexing in Java
  • Available string methods and their usage
  • Practical examples and use cases

Getting Started

  1. Clone this repository:

    git clone https://github.com/yourusername/java-string-manipulation.git
    
  2. Navigate to the specific example you want to study:

    cd java-string-manipulation/src/basics
    
  3. Compile and run any Java file:

    javac StringIndex.java
    java StringIndex
    

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A comprehensive guide and code examples for string manipulation in Java.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages