#strings

Found 19 articles tagged with #strings

Capitalize the first letter of a string in JavaScript

JavaScript provides several approaches to achieve this, ranging from basic techniques to more advanced methods involving functions or regular expressions.

How to convert binary to decimal in JavaScript

A binary number is a numeral system with a base of 2. It uses only two symbols, typically 0 and 1, to represent all values.

Compare two strings ignoring case in JavaScript

You can convert both strings to either lower case or upper case, use the localeCompare method of the String object, or regular expressions with the i flag.

Valid Palindrome

The definition of a palindrome typically focuses on the sequence of characters and whether it reads the same forwards and backwards.

Longest Palindromic Substring

Identify the longest substring within a given input string that forms a palindrome, which is a sequence of characters that reads the same forwards as it does backward.

Longest Substring Without Repeating Characters

The goal of this problem is to find the length of the longest substring within a given string that does not contain any repeating characters.

How to check if string contains substring in Python

A substring is a contiguous sequence of characters within a string. Python provides several ways to check for substrings within a larger string.

Jul 29, 2023#python#strings

How to remove last character from string in JavaScript

Both substring() and slice() methods allow you to extract a portion of a string. By specifying a range that excludes the last character, you effectively remove it from the string.

How to slugify a string in JavaScript

A slug is a string that is used to uniquely identify a resource in a URL-friendly way. It is typically used in the URL to identify a specific page or post on a website.