Tuesday 3 April 2018

LPD - Low Polyamine Diet

The LPD diet is a hypoallergenic and low polyamine diet, low in putrescine, spermidine, spermine and histamine. Effective for auto-immune conditions. 
Not a money-making scheme - its for relief from pain and misery.
Foods To Eat
FRUIT
Apples
Apricot
Avocado (warning: high histamine)
Blackberries
Black Currant
Blueberries
Coconut
Grapes
Watermelon
Peach

GRAINS/BEANS/SEEDS
Flaxseed
Brown Rice (I cheat & eat basmati white rice!)
Pumpkin Seed

LIQUIDS
FRESHLY juiced veggies 
Tea non-caffeinated. Rooibos.
Water - pure

PROTEIN
Chicken (dark meat only).
Non-processed, non-smoked fish.   Bass, Cod, Herring, Mackerel, Sardines, Salmon, Sole.  Avoid spoilt or old fish. 
Turkey (dark meat) 

SPICES
Black Pepper
Cumin
Ginger
Oregano
Rosemary
Coriander
Quality Salt (Himalayan Pink Salt)
Turmeric

VEGETABLES
Beets – No vinegar.
Artichoke (not Jerusalem Artichokes)
Asparagus
Bok Choy
Brussels Sprouts
Cabbage (Green only)
Carrots
Celery (not much - psoralen & histamine)
Cilantro
Collard Greens
Cucumber
Ginger Root
Green Beans
Kale
Lettuce - not iceberg
Mushrooms (not many)
Onion  (not many)
Basmati Rice - no butter or oil added
Romaine
Sweet Potato (warning: high histamine)
Swiss Chard
Turnips, Parsnips, Swede

Clean eating - FRESH fresh fresh – pick the freshest food on the shelves with the best sell-by date, do not choose pre-cut or sliced-up foods (polyamine rich) , do not choose frozen (polyamine rich) – do not choose slightly gone-off or over ripe foods (polyamine rich)  – remove any parts that looks decayed. Fresh fresh fresh. No canned or processed foods. Shop at fresh food counters. Do not trust restaurants.

Foods NOT to Eat
DAIRY
All dairy

FERMENTED FOODS
Alcohol – especially beer. A little vodka if you must.
Cured Meats
Kimchi
Kombucha
Pickled Vegetables
Sauerkraut
Tofu & Tempeh
Yeast

FRUIT
Banana
Cherry
Dates
Figs
Orange
Mandarin
Tangerine
Grape Fruit
Mango
Melon
Pear
Pineapple
Rasberry
Strawberry

GRAINS/BEANS/LEGUMES
Barley
Buckwheat
Amaranth
Cereals
Corn
Cous-Cous
Gluten
Orzo
Peas
Quinoa (all types)
Wheat
Wheat Flour
Rice (I cheat and eat white basmati rice - seems OK for me)
Soy
Spelt

LIQUIDSTry to drink pure water only.
Alcohol (a little vodka if you must)
Coffee
Kombucha
Milk Cow
Soy
Almond Milk
Soda
Tea

NUTS & SEEDSAvoid all nuts and most seeds.
Almonds
Cashews
Hazelnuts
Peanuts
Pistachios
Sesame Seeds
Walnuts
Peanut Butter

PROTEINS
Bacon
Beef
Caviar
Chicken (Breast)
Cured Meat (Jamón Ibérico or Serrano, Pepperoni, Prosciutto, Salami, Ham)
Eggs
Fat
Liver
Pork
Protein Bars
Sausages
Shellfish (Calamari, Crab, Mussel, Oyster, Scallop)

SPICES
Basil
Cayenne, Paprika, Chilli
Parsley
Tarragon
Thyme

VEGETABLES
Artichokes (Jerusalem)
Basil Leaf
Bell Peppers
Cabbage (Red)
Celery (psoralen)
Chickpeas (Garbanzo Beans/Hummus)
Chilli Peppers
Eggplant
Fennel (psoralen)
Goji
Habanero Peppers
Legumes (Nuts, Seeds, Beans, Lentils, Peas and Soy Products)
Lentils
Mushroom
Mustard
Nightshades (tomatoes, potatoes, eggplant, peppers and goji)
Parsley
Pickles
Potatoes
Soy
Spinach
Truffle

MISC. FOODS
Artificial Colouring
Artificial Flavoring
Caffeinated items
Cooking Oils & Fats
Fried Foods
GMO Foods
Ketchup
Malt vinegar
Barbecue sauce
Soy sauce
Thousand Island-type sauces
MSG
Preservatives
Processed Foods
Soy Sauce
Sweeteners: Sugar, Corn Syrup, All Artificial Sweeteners
HFCS High fructose corn syrup

POLYAMINES
Normally polyamines are beneficial for cell regeneration, but in certain skin conditions these polyamines regenerate skin cells faster than normal.   Elevated levels of polyamine proteins (putrescine, spermidine, spermine, histamine) are found in people with auto-immune conditions.

The polyamines putrescine, spermidine and spermine commonly occur in the cells of most organisms. Their participation in human cell growth and proliferation has been of great interest for their role in tumour growth. Histamine is a key factor in inflammatory responses. Polyamines could be useful for post-operation patients, during wound healing and for growth and development of  the neonate digestive system. Both endogenous and dietary polyamines participate in such processes. Data on polyamine contents in  foods are limited and dieticians have thus limited plausible information. This review briefly summarizes  current knowledge on the biological implications of dietary polyamines.


While putrescine content increases by bacterial activity during inappropriate storage and processing  of foods of animal origin, spermidine and spermine originate mainly from raw materials. Higher contents of spermidine as compared  to spermine are typical for foods of plant origin, while an opposite relation is characteristic for foods of animal origin. The highest  contents of all polyamines were determined in cheeses, mainly in ripened types. High putrescine levels were reported in citrus fruits  and juices, sauerkraut, ketchup, fermented soybean products and fish sauce. Legumes, cauliflower and broccoli are foods with high  spermidine content, while meat, meat products and legumes are high in spermine. Commonly, polyamine contents range widely  within the individual food items. Extensive research is needed to extend the current limited database. (Source: 2004 Elsevier Ltd.)


Polyamines are also found in foods which through processing have had the structural integrity of their tissues ‘shocked’ or damaged through food preparation such as quick freezing or canning.


Putrescine Most ‘aged’ or ‘sharp’ cheeses are very high in putrescine. Vegetables such as potatoes, canned/frozen vegetables (other than green vegetables) or certain fruit products, such as oranges and tangerines, can have very high concentrations of putrescine. Fermented soy sauce (containing wheat) is also a rich source of polyamines, particularly putrescine. Shrimp, especially the packaged and frozen types have also been shown to have high levels of putrescine. High amounts are also found in animal foods, citrus fruits, and juices.


Spermidine: Mature cheeses, fermented soybeans, fermented tea, Japanese Sake, domestic mushrooms, broccoli, cauliflower, legumes, soybean, pear (black), potatoes and fresh bread are high sources of spermidine.

Spermine: Cereals (other than bread), canned or frozen vegetables, legumes (seeds and beans), meat products, red meat and poultry (roasted chicken breast) are high sources of spermine.


Histamine – known to cause allergic issues. Fish poisoning – scombroid is thought to be caused by histamines in spoilt fish. Histamine creates inflammation (that's its purpose in the body) but can get out of control. Although this diet sheet is not specifically for histamine it is quite good for achieving low levels (avocado excepted)


The following is a list of polyamine-rich foods to avoid:
Alcohol
Broccoli
Cauliflower
Canned Foods
Cheese (Sharp, Aged / Fermented)
Cereals (Wheat, Corn)
Citrus Fruits (Oranges, Tangerines, Mandarin, Grape Fruit) and Juices
Fermented Foods
Flash Frozen Foods
Ketchup
Legumes (Seeds and Beans)
Lentils
Lunch Meats (e.g. Ham, Turkey, Bologna, and Salami)
Meat (Beef, Roasted Chicken Breast)
Meat Fat
Meat Liver (Chicken)
Meat Ground (Beef, Chicken, Turkey, Pork)
Mushrooms
Mustard
Parsley
Peas
Pear
Potatoes
Processed Foods
Quinoa
Rice Bran
Sauerkraut
Shell Fish
Soybeans Fermented (Tofu, Tempeh)
Spinach
Tomatoes
————
TABLE I
Top 10 foods with the highest polyamine content
(Source: Fred Hutchinson Cancer Research Center)

 ITEM    SERVING SIZE   POLYAMINE (NMOL) PER SERVING SIZE
Putrescine
Corn (fresh/canned) ½ cup 560,000/902,880a
Grapefruit juice 1 cup 276,640
Oranges 1 medium 174,230
Orange juice 1 cup 154,629
Grits 1 cup 99,728
Crab (canned) ½ cup 93,555
Grapefruit ½ medium 90,176
Cream of potato soup 1 cup 70,930
Tortilla chips 1 small bag 56,717
Tomato and V8b juice 1 cup 56,181
Spermidine
Corn (fresh/canned) ½ cup 137,682/221,111a
Green pea soup 1 cup 65,552
Pear 1 medium 60,756
Cheese enchilada 1 medium 48,770
Tempeh 3 oz 42,618
Soy burgers 1 39,616
Peas (fresh/canned) ½ cup 35,9 20/38,165a
Lentil soup 1 cup 37,117
Pasta with meat sauce 1 cup 36,059
Tofu hotdog 1 27,121
Spermine
Green pea soup 1 cup 36,988
Chicken liver 4 oz 33,226
Chili with meat and beans 1 cup 26,441
Chicken breast (grilled/roasted) 1 large 21,560/24,420a
Black bean soup 1 cup 23,786
Peas, fresh 1 medium 23,572
Peas (fresh/canned) ½ cup 20,840/22,143a
Bean with bacon soup 1 cup 22,062
Ground turkey 3 oz 21,535
Tempeh 3 oz 20,565
aThese two figures provide values for the food in the two different forms described.
bCampbell Soup Co, Camden, NJ.
——————
TABLE II
Top 10 major dietary contributors of polyamines
(Source: Fred Hutchinson Cancer Research Center)

ITEM POLYAMINE CONTRIBUTION (NMOL/DAY)
Putrescine
Orange juice and grapefruit juice 44,441
Oranges, grapefruit, and tangerines (not including juice) 17,613
Fresh tomatoes 10,042
Bananas 7,344
Beer (all types) 6,374
Corn and hominy 5,832
Cheese (eg, American, cheddar) 5,592
Potato chips, tortilla chips, corn chips, puffs, and pretzels 4,595
Burritos, tacos, tostadas, and quesadillas 4,411
Green pepper and green chilies 4,343
Spermidine
Green peas 3,283
Cheese, such as American and cheddar 3,124
Lasagna and pasta with meat sauce 2,900
Potatoes (boiled, baked, and mashed) 2,388
Burritos, tacos, tostadas, and quesadillas 1,890
Dark breads (including dark bagels and rolls) 1,736
Green salad (lettuce or spinach) 1,535
Low- or reduced-fat cheese 1,456
Corn and hominy 2,765
Broccoli 1,347
Spermine
Ground meat 2,186
Lunch meats (eg, ham, turkey, bologna, and salami) 1,977
Green peas 1,905
Lasagna and pasta with meat sauce 1,443
Peanut butter, peanuts, and other nuts and seeds 1,237
Rice, noodles, and other grains 1,136
Chili with meat and beans 1,027
Bean soups such as pea, lentil, and black bean 747
Cheese (eg, American, cheddar) 670
Stew, pot pie, and casseroles with meat or chicken 65
Histamine
Alcohol: most notably beer, wine and champagne.
Cooked meat: smoked fish, salami, beef, pork
Raw Meat: shellfish, tuna
Pickled, canned foods: pickles,  relish, soy sauce
Fermented foods such as yogurt, kefir, buttermilk
Cheeses such as parmesan, gouda, swiss, cheddar
Fruit: dried fruit
Vegetables: tomatoes
Legumes: Chickpeas, soybeans, peanuts, and red beans
Beverages: Milk, sodas, sugary beverages
Spices: Cinnamon, chilli powder, nutmeg, curry
Additives: Tartrazine, artificial colors
Preservatives: Benzoates, sulphites, vinegar
Grains: wheat, buckwheat, rye, corn
Foods that facilitate production of histamine in the body: Citrus, papaya, pineapple, nuts, egg whites, food fillers and additives.
Diamine oxidase inhibitors: caffeinated tea

Monday 2 April 2018

Low Polyamine Diet

The LPD diet is a hypoallergenic and low polyamine diet, low in putrescine, spermidine, spermine and histamine. Effective for auto-immune conditions. 
Not a money-making scheme - its for relief from pain and misery.
Foods To Eat
FRUIT
Apples
Apricot
Avocado (warning: high histamine)
Blackberries
Black Currant
Blueberries
Coconut
Grapes
Watermelon
Peach

GRAINS/BEANS/SEEDS
Flaxseed
Brown Rice (I cheat & eat basmati white rice!)
Pumpkin Seed

LIQUIDS
FRESHLY juiced veggies 
Tea non-caffeinated. Rooibos.
Water - pure

PROTEIN
Chicken (dark meat only).
Non-processed, non-smoked fish.   Bass, Cod, Herring, Mackerel, Sardines, Salmon, Sole.  Avoid spoilt or old fish. 
Turkey (dark meat) 

SPICES
Black Pepper
Cumin
Ginger
Oregano
Rosemary
Coriander
Quality Salt (Himalayan Pink Salt)
Turmeric

VEGETABLES
Beets – No vinegar.
Artichoke (not Jerusalem Artichokes)
Asparagus
Bok Choy
Brussels Sprouts
Cabbage (Green only)
Carrots
Celery (not much - psoralen & histamine)
Cilantro
Collard Greens
Cucumber
Ginger Root
Green Beans
Kale
Lettuce - not iceberg
Mushrooms (not many)
Onion  (not many)
Basmati Rice - no butter or oil added
Romaine
Sweet Potato (warning: high histamine)
Swiss Chard
Turnips, Parsnips, Swede

Clean eating - FRESH fresh fresh – pick the freshest food on the shelves with the best sell-by date, do not choose pre-cut or sliced-up foods (polyamine rich) , do not choose frozen (polyamine rich) – do not choose slightly gone-off or over ripe foods (polyamine rich)  – remove any parts that looks decayed. Fresh fresh fresh. No canned or processed foods. Shop at fresh food counters. Do not trust restaurants.

Foods NOT to Eat
DAIRY
All dairy

FERMENTED FOODS
Alcohol – especially beer. A little vodka if you must.
Cured Meats
Kimchi
Kombucha
Pickled Vegetables
Sauerkraut
Tofu & Tempeh
Yeast

FRUIT
Banana
Cherry
Dates
Figs
Orange
Mandarin
Tangerine
Grape Fruit
Mango
Melon
Pear
Pineapple
Rasberry
Strawberry

GRAINS/BEANS/LEGUMES
Barley
Buckwheat
Amaranth
Cereals
Corn
Cous-Cous
Gluten
Orzo
Peas
Quinoa (all types)
Wheat
Wheat Flour
Rice (I cheat and eat white basmati rice - seems OK for me)
Soy
Spelt

LIQUIDSTry to drink pure water only.
Alcohol (a little vodka if you must)
Coffee
Kombucha
Milk Cow
Soy
Almond Milk
Soda
Tea

NUTS & SEEDSAvoid all nuts and most seeds.
Almonds
Cashews
Hazelnuts
Peanuts
Pistachios
Sesame Seeds
Walnuts
Peanut Butter

PROTEINS
Bacon
Beef
Caviar
Chicken (Breast)
Cured Meat (Jamón Ibérico or Serrano, Pepperoni, Prosciutto, Salami, Ham)
Eggs
Fat
Liver
Pork
Protein Bars
Sausages
Shellfish (Calamari, Crab, Mussel, Oyster, Scallop)

SPICES
Basil
Cayenne, Paprika, Chilli
Parsley
Tarragon
Thyme

VEGETABLES
Artichokes (Jerusalem)
Basil Leaf
Bell Peppers
Cabbage (Red)
Celery (psoralen)
Chickpeas (Garbanzo Beans/Hummus)
Chilli Peppers
Eggplant
Fennel (psoralen)
Goji
Habanero Peppers
Legumes (Nuts, Seeds, Beans, Lentils, Peas and Soy Products)
Lentils
Mushroom
Mustard
Nightshades (tomatoes, potatoes, eggplant, peppers and goji)
Parsley
Pickles
Potatoes
Soy
Spinach
Truffle

MISC. FOODS
Artificial Colouring
Artificial Flavoring
Caffeinated items
Cooking Oils & Fats
Fried Foods
GMO Foods
Ketchup
Malt vinegar
Barbecue sauce
Soy sauce
Thousand Island-type sauces
MSG
Preservatives
Processed Foods
Soy Sauce
Sweeteners: Sugar, Corn Syrup, All Artificial Sweeteners
HFCS High fructose corn syrup

POLYAMINES
Normally polyamines are beneficial for cell regeneration, but in certain skin conditions these polyamines regenerate skin cells faster than normal.   Elevated levels of polyamine proteins (putrescine, spermidine, spermine, histamine) are found in people with auto-immune conditions.

The polyamines putrescine, spermidine and spermine commonly occur in the cells of most organisms. Their participation in human cell growth and proliferation has been of great interest for their role in tumour growth. Histamine is a key factor in inflammatory responses. Polyamines could be useful for post-operation patients, during wound healing and for growth and development of  the neonate digestive system. Both endogenous and dietary polyamines participate in such processes. Data on polyamine contents in  foods are limited and dieticians have thus limited plausible information. This review briefly summarizes  current knowledge on the biological implications of dietary polyamines.


While putrescine content increases by bacterial activity during inappropriate storage and processing  of foods of animal origin, spermidine and spermine originate mainly from raw materials. Higher contents of spermidine as compared  to spermine are typical for foods of plant origin, while an opposite relation is characteristic for foods of animal origin. The highest  contents of all polyamines were determined in cheeses, mainly in ripened types. High putrescine levels were reported in citrus fruits  and juices, sauerkraut, ketchup, fermented soybean products and fish sauce. Legumes, cauliflower and broccoli are foods with high  spermidine content, while meat, meat products and legumes are high in spermine. Commonly, polyamine contents range widely  within the individual food items. Extensive research is needed to extend the current limited database. (Source: 2004 Elsevier Ltd.)


Polyamines are also found in foods which through processing have had the structural integrity of their tissues ‘shocked’ or damaged through food preparation such as quick freezing or canning.


Putrescine Most ‘aged’ or ‘sharp’ cheeses are very high in putrescine. Vegetables such as potatoes, canned/frozen vegetables (other than green vegetables) or certain fruit products, such as oranges and tangerines, can have very high concentrations of putrescine. Fermented soy sauce (containing wheat) is also a rich source of polyamines, particularly putrescine. Shrimp, especially the packaged and frozen types have also been shown to have high levels of putrescine. High amounts are also found in animal foods, citrus fruits, and juices.


Spermidine: Mature cheeses, fermented soybeans, fermented tea, Japanese Sake, domestic mushrooms, broccoli, cauliflower, legumes, soybean, pear (black), potatoes and fresh bread are high sources of spermidine.

Spermine: Cereals (other than bread), canned or frozen vegetables, legumes (seeds and beans), meat products, red meat and poultry (roasted chicken breast) are high sources of spermine.


Histamine – known to cause allergic issues. Fish poisoning – scombroid is thought to be caused by histamines in spoilt fish. Histamine creates inflammation (that's its purpose in the body) but can get out of control. Although this diet sheet is not specifically for histamine it is quite good for achieving low levels (avocado excepted)


The following is a list of polyamine-rich foods to avoid:
Alcohol
Broccoli
Cauliflower
Canned Foods
Cheese (Sharp, Aged / Fermented)
Cereals (Wheat, Corn)
Citrus Fruits (Oranges, Tangerines, Mandarin, Grape Fruit) and Juices
Fermented Foods
Flash Frozen Foods
Ketchup
Legumes (Seeds and Beans)
Lentils
Lunch Meats (e.g. Ham, Turkey, Bologna, and Salami)
Meat (Beef, Roasted Chicken Breast)
Meat Fat
Meat Liver (Chicken)
Meat Ground (Beef, Chicken, Turkey, Pork)
Mushrooms
Mustard
Parsley
Peas
Pear
Potatoes
Processed Foods
Quinoa
Rice Bran
Sauerkraut
Shell Fish
Soybeans Fermented (Tofu, Tempeh)
Spinach
Tomatoes
————
TABLE I
Top 10 foods with the highest polyamine content
(Source: Fred Hutchinson Cancer Research Center)

 ITEM    SERVING SIZE   POLYAMINE (NMOL) PER SERVING SIZE
Putrescine
Corn (fresh/canned) ½ cup 560,000/902,880a
Grapefruit juice 1 cup 276,640
Oranges 1 medium 174,230
Orange juice 1 cup 154,629
Grits 1 cup 99,728
Crab (canned) ½ cup 93,555
Grapefruit ½ medium 90,176
Cream of potato soup 1 cup 70,930
Tortilla chips 1 small bag 56,717
Tomato and V8b juice 1 cup 56,181
Spermidine
Corn (fresh/canned) ½ cup 137,682/221,111a
Green pea soup 1 cup 65,552
Pear 1 medium 60,756
Cheese enchilada 1 medium 48,770
Tempeh 3 oz 42,618
Soy burgers 1 39,616
Peas (fresh/canned) ½ cup 35,9 20/38,165a
Lentil soup 1 cup 37,117
Pasta with meat sauce 1 cup 36,059
Tofu hotdog 1 27,121
Spermine
Green pea soup 1 cup 36,988
Chicken liver 4 oz 33,226
Chili with meat and beans 1 cup 26,441
Chicken breast (grilled/roasted) 1 large 21,560/24,420a
Black bean soup 1 cup 23,786
Peas, fresh 1 medium 23,572
Peas (fresh/canned) ½ cup 20,840/22,143a
Bean with bacon soup 1 cup 22,062
Ground turkey 3 oz 21,535
Tempeh 3 oz 20,565
aThese two figures provide values for the food in the two different forms described.
bCampbell Soup Co, Camden, NJ.
——————
TABLE II
Top 10 major dietary contributors of polyamines
(Source: Fred Hutchinson Cancer Research Center)

ITEM POLYAMINE CONTRIBUTION (NMOL/DAY)
Putrescine
Orange juice and grapefruit juice 44,441
Oranges, grapefruit, and tangerines (not including juice) 17,613
Fresh tomatoes 10,042
Bananas 7,344
Beer (all types) 6,374
Corn and hominy 5,832
Cheese (eg, American, cheddar) 5,592
Potato chips, tortilla chips, corn chips, puffs, and pretzels 4,595
Burritos, tacos, tostadas, and quesadillas 4,411
Green pepper and green chilies 4,343
Spermidine
Green peas 3,283
Cheese, such as American and cheddar 3,124
Lasagna and pasta with meat sauce 2,900
Potatoes (boiled, baked, and mashed) 2,388
Burritos, tacos, tostadas, and quesadillas 1,890
Dark breads (including dark bagels and rolls) 1,736
Green salad (lettuce or spinach) 1,535
Low- or reduced-fat cheese 1,456
Corn and hominy 2,765
Broccoli 1,347
Spermine
Ground meat 2,186
Lunch meats (eg, ham, turkey, bologna, and salami) 1,977
Green peas 1,905
Lasagna and pasta with meat sauce 1,443
Peanut butter, peanuts, and other nuts and seeds 1,237
Rice, noodles, and other grains 1,136
Chili with meat and beans 1,027
Bean soups such as pea, lentil, and black bean 747
Cheese (eg, American, cheddar) 670
Stew, pot pie, and casseroles with meat or chicken 65
Histamine
Alcohol: most notably beer, wine and champagne.
Cooked meat: smoked fish, salami, beef, pork
Raw Meat: shellfish, tuna
Pickled, canned foods: pickles,  relish, soy sauce
Fermented foods such as yogurt, kefir, buttermilk
Cheeses such as parmesan, gouda, swiss, cheddar
Fruit: dried fruit
Vegetables: tomatoes
Legumes: Chickpeas, soybeans, peanuts, and red beans
Beverages: Milk, sodas, sugary beverages
Spices: Cinnamon, chilli powder, nutmeg, curry
Additives: Tartrazine, artificial colors
Preservatives: Benzoates, sulphites, vinegar
Grains: wheat, buckwheat, rye, corn
Foods that facilitate production of histamine in the body: Citrus, papaya, pineapple, nuts, egg whites, food fillers and additives.
Diamine oxidase inhibitors: caffeinated tea

Saturday 16 December 2017

Swift version 4 Search Strings Code examples

Tested in Playground for Xcode 9, Swift Version 4 (4.0.3) tested code samples:

-------------------------------------------------------------------------------------------
Swift 4 Xcode 9: Search for a string in a string with keyword: "contains"

let astring = "Hello dear blog readers, I love this, its is so simple"
let asubstring = "readers, I love"

if astring.lowercased().contains(asubstring.lowercased()) {
    print("the search gave: " + asubstring)

}
// returns the search gave: readers, I love

--------------------------------------------------------------------------------------------
Swift 4 Xcode 9Search for a string in an Array using "contains" and a filter thing:

let itemsArray = ["Google", "Goodbye", "Go go", "Hello"]
var filterdItemsArray = [String]()
var searchText = "Go go"

filterdItemsArray = itemsArray.filter { item in item.lowercased().contains(searchText.lowercased())}

print(filterdItemsArray)
// returns ["Run away"]


---------------------------------------------------------------------------
Swift 4 Xcode 9: Search for a string in an array using "contains" (but I didn't manage to lowercase it!)



let itemsArray = ["Zebra", "Lion", "Run away", "Leopard"]
var searchText = "Run away"

if itemsArray.contains(searchText) {
    print("the search gave: " + searchText) }

// returns the search gave: Run away


---------------------------------------------------------------------------
Swift 4 Xcode 9: Remove a character from a string using the filter keyword:


let mystring = "blubbery beach"
let filteredString = mystring.filter { $0 != "b" }

print (filteredString)
// returns luery each (takes out the bs from blubbery beach)

---------------------------------------------------------------------------
Swift 4 Xcode 9: String contains example:


print("one two three four".contains("two three"))
// returns: true

---------------------------------------------------------------------------

Swift 4 Xcode 9: Search a string with range of example:

var stringy = "well well, what have we here"

if stringy.lowercased().range(of:"what have") != nil {
    print("exists")

}
// returns: exists

---------------------------------------------------------------------------